forked from p96170835/amis
Merge pull request #464 from RickCole21/master
crud handlebulkaction 后 feedback层多加个ctx
This commit is contained in:
commit
90926bfeb2
|
@ -428,18 +428,19 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|||
(action.messages && action.messages.failed) ||
|
||||
(messages && messages.saveFailed)
|
||||
})
|
||||
.then(async () => {
|
||||
if (action.feedback && isVisible(action.feedback, store.data)) {
|
||||
await this.openFeedback(action.feedback, store.data);
|
||||
.then(async (payload: object) => {
|
||||
const data = createObject(ctx, payload);
|
||||
if (action.feedback && isVisible(action.feedback, data)) {
|
||||
await this.openFeedback(action.feedback, data);
|
||||
stopAutoRefreshWhenModalIsOpen && clearTimeout(this.timer);
|
||||
}
|
||||
|
||||
action.reload
|
||||
? this.reloadTarget(action.reload, store.data)
|
||||
? this.reloadTarget(action.reload, data)
|
||||
: this.search({[pageField || 'page']: 1}, undefined, true);
|
||||
|
||||
action.redirect &&
|
||||
env.jumpTo(filter(action.redirect, store.data), action);
|
||||
env.jumpTo(filter(action.redirect, data), action);
|
||||
})
|
||||
.catch(() => null);
|
||||
} else if (onAction) {
|
||||
|
|
Loading…
Reference in New Issue