Merge pull request #11051 from kangzhanlei/fit-tablerow
Some checks are pending
CodeQL / Analyze (javascript) (push) Waiting to run
gh-pages / build (20.x) (push) Waiting to run

fit: 解决表格行编辑的时候的弹窗,无法获取返回值的问题
This commit is contained in:
Allen 2024-11-22 17:52:16 +08:00 committed by GitHub
commit c6d3fe121d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

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

View File

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