关联勾选左侧默认值
This commit is contained in:
parent
ae0a1504cc
commit
f7e6dbf2be
|
@ -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<any>;
|
||||
|
@ -44,7 +45,9 @@ export class AssociatedCheckboxes extends Checkboxes<
|
|||
AssociatedCheckboxesProps,
|
||||
AssociatedCheckboxesState
|
||||
> {
|
||||
state: AssociatedCheckboxesState = {};
|
||||
state: AssociatedCheckboxesState = {
|
||||
leftValue: this.props.leftDefaultValue
|
||||
};
|
||||
|
||||
@autobind
|
||||
leftOption2Value(option: Option) {
|
||||
|
|
|
@ -178,6 +178,7 @@ export class TabsTransfer extends React.Component<TabsTransferProps> {
|
|||
onDeferLoad={onDeferLoad}
|
||||
leftMode={option.leftMode}
|
||||
leftOptions={option.leftOptions}
|
||||
leftDefaultValue={option.leftDefaultValue}
|
||||
/>
|
||||
) : (
|
||||
<ListCheckboxes
|
||||
|
|
|
@ -38,6 +38,7 @@ export interface TransferProps extends ThemeProps, CheckboxesProps {
|
|||
) => JSX.Element;
|
||||
leftOptions?: Array<Option>;
|
||||
leftMode?: 'tree' | 'list';
|
||||
leftDefaultValue?: any;
|
||||
rightMode?: 'table' | 'list' | 'tree' | 'chained';
|
||||
|
||||
// search 相关
|
||||
|
@ -320,7 +321,8 @@ export class Transfer extends React.Component<TransferProps, TransferState> {
|
|||
leftOptions,
|
||||
leftMode,
|
||||
rightMode,
|
||||
cellRender
|
||||
cellRender,
|
||||
leftDefaultValue
|
||||
} = this.props;
|
||||
|
||||
return selectMode === 'table' ? (
|
||||
|
@ -364,6 +366,7 @@ export class Transfer extends React.Component<TransferProps, TransferState> {
|
|||
leftOptions={leftOptions || []}
|
||||
leftMode={leftMode}
|
||||
rightMode={rightMode}
|
||||
leftDefaultValue={leftDefaultValue}
|
||||
/>
|
||||
) : (
|
||||
<ListCheckboxes
|
||||
|
|
Loading…
Reference in New Issue