From f7e6dbf2be174f07943fb37ebe03ba5c50162204 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Fri, 29 May 2020 13:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E8=81=94=E5=8B=BE=E9=80=89=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AssociatedCheckboxes.tsx | 5 ++++- src/components/TabsTransfer.tsx | 1 + src/components/Transfer.tsx | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/AssociatedCheckboxes.tsx b/src/components/AssociatedCheckboxes.tsx index fe997d4e..2f0b4a5a 100644 --- a/src/components/AssociatedCheckboxes.tsx +++ b/src/components/AssociatedCheckboxes.tsx @@ -21,6 +21,7 @@ import TreeRadios from './TreeRadios'; export interface AssociatedCheckboxesProps extends CheckboxesProps { leftOptions: Options; + leftDefaultValue?: any; leftMode?: 'tree' | 'list'; rightMode?: 'table' | 'list' | 'tree' | 'chained'; columns?: Array; @@ -44,7 +45,9 @@ export class AssociatedCheckboxes extends Checkboxes< AssociatedCheckboxesProps, AssociatedCheckboxesState > { - state: AssociatedCheckboxesState = {}; + state: AssociatedCheckboxesState = { + leftValue: this.props.leftDefaultValue + }; @autobind leftOption2Value(option: Option) { diff --git a/src/components/TabsTransfer.tsx b/src/components/TabsTransfer.tsx index 312d3caa..f410f617 100644 --- a/src/components/TabsTransfer.tsx +++ b/src/components/TabsTransfer.tsx @@ -178,6 +178,7 @@ export class TabsTransfer extends React.Component { onDeferLoad={onDeferLoad} leftMode={option.leftMode} leftOptions={option.leftOptions} + leftDefaultValue={option.leftDefaultValue} /> ) : ( JSX.Element; leftOptions?: Array