From fbd29830ec9d5096d30e56b62045f71313975217 Mon Sep 17 00:00:00 2001 From: "chenyang.e" Date: Fri, 14 Aug 2020 14:31:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BANestedSelect=E6=B7=BB=E5=8A=A0checkAll?= =?UTF-8?q?=E5=92=8CcheckAllLabel=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/NestedSelect.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderers/Form/NestedSelect.tsx b/src/renderers/Form/NestedSelect.tsx index f1bcb353..144fa21e 100644 --- a/src/renderers/Form/NestedSelect.tsx +++ b/src/renderers/Form/NestedSelect.tsx @@ -38,7 +38,9 @@ export default class NestedSelectControl extends React.Component< static defaultProps: Partial = { cascade: false, withChildren: false, - searchPromptText: '输入内容进行检索' + searchPromptText: '输入内容进行检索', + checkAll: true, + checkAllLabel: '全选', }; target: any; input: HTMLInputElement; @@ -395,6 +397,8 @@ export default class NestedSelectControl extends React.Component< options, disabled, searchable, + checkAll, + checkAllLabel, searchPromptText, translate: __, labelField @@ -430,7 +434,7 @@ export default class NestedSelectControl extends React.Component< {stack.map((options, index) => (
{index === 0 ? searchInput : null} - {multiple && index === 0 ? ( + {multiple && checkAll && index === 0 ? (
- 全选 + {__(checkAllLabel)}
) : null}