From 59528118082f707aad73a5cc24a4da7ec4505c88 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Mon, 30 Dec 2019 23:43:24 +0800 Subject: [PATCH] =?UTF-8?q?combo=20=E7=9A=84=20changeImmediately=20?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=AD=90=20form=20=E7=9A=84=20lazyCHange=20?= =?UTF-8?q?=E5=85=A8=E5=85=B3=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/Combo.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/renderers/Form/Combo.tsx b/src/renderers/Form/Combo.tsx index b0bfb1cc0..00aee0906 100644 --- a/src/renderers/Form/Combo.tsx +++ b/src/renderers/Form/Combo.tsx @@ -61,6 +61,7 @@ export interface ComboProps extends FormControlProps { tabsStyle: '' | 'line' | 'card' | 'radio'; tabsLabelTpl?: string; lazyLoad?: boolean; + changeImmediately?: boolean; strictMode?: boolean; messages?: { validateFailed?: string; @@ -107,6 +108,7 @@ export default class ComboControl extends React.Component { 'tabsMode', 'tabsStyle', 'lazyLoad', + 'changeImmediately', 'strictMode' ]; @@ -631,7 +633,8 @@ export default class ComboControl extends React.Component { addIcon, deleteIcon, tabsLabelTpl, - conditions + conditions, + changeImmediately } = this.props; let controls = this.props.controls; @@ -776,6 +779,8 @@ export default class ComboControl extends React.Component { onAction: this.handleAction, ref: this.makeFormRef(index), canAccessSuperData, + lazyChange: changeImmediately ? false : true, + lazyFormChange: changeImmediately ? false : true, value: undefined, formItemValue: undefined } @@ -823,7 +828,8 @@ export default class ComboControl extends React.Component { deleteIcon, noBorder, conditions, - lazyLoad + lazyLoad, + changeImmediately } = this.props; let controls = this.props.controls; @@ -948,6 +954,8 @@ export default class ComboControl extends React.Component { onInit: this.handleFormInit, onAction: this.handleAction, ref: this.makeFormRef(index), + lazyChange: changeImmediately ? false : true, + lazyFormChange: changeImmediately ? false : true, lazyLoad, canAccessSuperData, value: undefined,