Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/amis/src/renderers/Cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export default class Cards extends React.Component<GridProps, object> {
const {onAction} = this.props;

// 需要支持特殊事件吗?
onAction(e, action, ctx);
return onAction?.(e, action, ctx);
}

handleCheck(item: IItem) {
Expand Down
2 changes: 1 addition & 1 deletion packages/amis/src/renderers/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export default class List extends React.Component<ListProps, ListState> {
);
} else {
/** action无值代表List自身已经处理, 无需交给上层处理 */
action && onAction?.(e, action, ctx);
return action && onAction?.(e, action, ctx);
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/amis/src/renderers/Service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ export default class Service extends React.Component<ServiceProps> {

if (api && action.actionType === 'ajax') {
store.setCurrentAction(action, this.props.resolveDefinitions);
store
return store
.saveRemote(action.api as string, data, {
successMessage: __(action.messages && action.messages.success),
errorMessage: __(action.messages && action.messages.failed)
Expand All @@ -764,7 +764,7 @@ export default class Service extends React.Component<ServiceProps> {
}
});
} else {
onAction(e, action, data, throwErrors, delegate || this.context);
return onAction(e, action, data, throwErrors, delegate || this.context);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/amis/src/renderers/Table2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ export default class Table2 extends React.Component<Table2Props, object> {
const {onAction} = this.props;

// todo
onAction && onAction(e, action, ctx);
return onAction?.(e, action, ctx);
}

renderActions(region: string) {
Expand Down
6 changes: 3 additions & 3 deletions packages/amis/src/renderers/Wizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,12 @@ export default class Wizard extends React.Component<WizardProps, WizardState> {
targetStep <= steps.length &&
targetStep >= 0
) {
this.gotoStep((data as any).step);
return this.gotoStep((data as any).step);
}
} else if (action.actionType === 'submit') {
this.finalSubmit();
return this.finalSubmit();
} else if (onAction) {
onAction(e, action, data, throwErrors, delegate || this.context);
return onAction(e, action, data, throwErrors, delegate || this.context);
}
}

Expand Down
Loading