From 25ba570a3ff7b6dffe865f5f3b350d1110dcd709 Mon Sep 17 00:00:00 2001 From: rickcole Date: Wed, 17 Jun 2020 19:02:32 +0800 Subject: [PATCH] fix --- src/renderers/CRUD.tsx | 8 ++------ src/renderers/Form/index.tsx | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/renderers/CRUD.tsx b/src/renderers/CRUD.tsx index 2d492ca5..179d4cbc 100644 --- a/src/renderers/CRUD.tsx +++ b/src/renderers/CRUD.tsx @@ -393,8 +393,7 @@ export default class CRUD extends React.Component { messages, pageField, stopAutoRefreshWhenModalIsOpen, - env, - onClose + env } = this.props; if (!selectedItems.length && action.requireSelected !== false) { @@ -446,10 +445,7 @@ export default class CRUD extends React.Component { action.reload ? this.reloadTarget(action.reload, data) : this.search({[pageField || 'page']: 1}, undefined, true); - if (action.close) { - onClose(); - this.closeTarget(action.close); - } + action.close && this.closeTarget(action.close); const redirect = action.redirect && filter(action.redirect, data); redirect && env.jumpTo(redirect, action); diff --git a/src/renderers/Form/index.tsx b/src/renderers/Form/index.tsx index 1d704037..e7bb633f 100644 --- a/src/renderers/Form/index.tsx +++ b/src/renderers/Form/index.tsx @@ -558,7 +558,6 @@ export default class Form extends React.Component { onReset, onFinished, onFailed, - onClose, redirect, reload, target,