fit: 解决表格行编辑的时候的弹窗,无法获取返回值的问题

This commit is contained in:
kzl 2024-10-15 11:39:56 +08:00
parent 46a2dd0ad4
commit 7e8554acee
2 changed files with 4 additions and 2 deletions

View File

@ -132,7 +132,7 @@ export class TableRow extends React.PureComponent<
@autobind
handleAction(e: React.UIEvent<any>, action: Action, ctx: any) {
const {onAction, item} = this.props;
onAction && onAction(e, action, ctx || item.locals);
return onAction && onAction(e, action, ctx || item.locals);
}
@autobind

View File

@ -220,6 +220,7 @@ export type TableColumnWithType = SchemaObject & TableColumnObject;
export type TableColumn = TableColumnWithType | TableColumnObject;
type AutoFillHeightObject = Record<'height' | 'maxHeight', number>;
/**
* Table
* https://aisuda.bce.baidu.com/amis/zh-CN/components/table
@ -1025,7 +1026,7 @@ export default class Table extends React.Component<TableProps, object> {
const {onAction} = this.props;
// todo
onAction(e, action, ctx);
return onAction(e, action, ctx);
}
async handleCheck(item: IRow, value?: boolean, shift?: boolean) {
@ -1375,6 +1376,7 @@ export default class Table extends React.Component<TableProps, object> {
}
tableUnWatchResize?: () => void;
tableRef(ref: HTMLTableElement) {
this.table = ref;
isAlive(this.props.store) && this.props.store.setTable(ref);