mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-06 05:49:32 +08:00
parent
a4aa44a799
commit
37de6ea70f
@ -1056,23 +1056,35 @@ export default class CRUD2 extends React.Component<CRUD2Props, any> {
|
||||
// @ts-ignore
|
||||
return this[`handle${upperFirst(action.actionType)}`](data);
|
||||
}
|
||||
// const {onAction, data: ctx} = this.props;
|
||||
// return this.props.onAction?.(
|
||||
// undefined,
|
||||
// action,
|
||||
// ctx,
|
||||
// throwErrors,
|
||||
// undefined
|
||||
// );
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleAction(
|
||||
e: React.UIEvent<any> | undefined,
|
||||
action: ActionObject,
|
||||
ctx: object
|
||||
ctx: object,
|
||||
throwErrors: boolean = false,
|
||||
delegate?: IScopedContext
|
||||
) {
|
||||
return this.doAction(action, ctx);
|
||||
if (
|
||||
[
|
||||
'stopAutoRefresh',
|
||||
'reload',
|
||||
'search',
|
||||
'startAutoRefresh',
|
||||
'loadMore'
|
||||
].includes(action.actionType as any)
|
||||
) {
|
||||
return this.doAction(action, ctx, throwErrors);
|
||||
} else {
|
||||
return this.props.onAction(
|
||||
e,
|
||||
action,
|
||||
ctx,
|
||||
throwErrors,
|
||||
delegate || this.context
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
unSelectItem(item: any, index: number) {
|
||||
|
Loading…
Reference in New Issue
Block a user