choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
77 lines (76 loc) • 2.57 kB
TypeScript
import { ReactNode } from 'react';
import { Select, SelectProps } from '../select/Select';
import Option from '../option/Option';
import OptGroup from '../option/OptGroup';
import Record from '../data-set/Record';
export interface TransferProps extends SelectProps {
titles?: [ReactNode, ReactNode];
footer?: (props: any) => ReactNode;
operations?: string[] | ReactNode[];
sortable?: boolean;
sortOperations?: string[] | ReactNode[];
oneWay?: boolean;
}
export default class Transfer extends Select<TransferProps> {
static displayName: string;
static defaultProps: {
suffixCls: string;
multiple: boolean;
sortable: boolean;
oneWay: boolean;
combo: boolean;
checkValueOnOptionsChange: boolean;
onOption: ({ record }: {
record: any;
}) => {
disabled: any;
};
selectAllButton: boolean;
clearButton: boolean;
popupPlacement: string;
triggerShowDelay: number;
triggerHiddenDelay: number;
viewMode: import("../trigger-field/TriggerField").TriggerViewMode;
border: boolean;
valueChangeAction: import("../text-field/enum").ValueChangeAction;
waitType: import("../core/enum").WaitType;
readOnly: boolean;
disabled: boolean;
noValidate: boolean;
trim: import("../data-set/enum").FieldTrim;
};
static Option: typeof Option;
static OptGroup: typeof OptGroup;
sourceSelected: Record[];
targetSelected: Record[];
targetCurrentSelected: string | undefined;
isCustom: boolean;
constructor(props: any, context: any);
sourceFilter(record: any, index: any, array: any): boolean;
targetFilter(record: any, index: any, array: any): boolean;
handleMenuClick({ item: { props: { value }, }, }: {
item: {
props: {
value: any;
};
};
}): void;
handleTargetMenuClick({ item: { props: { value }, }, }: {
item: {
props: {
value: any;
};
};
}): void;
handleMoveToLeft(): void;
handleMoveToRight(): void;
handleSortTo(direction: string): void;
handleSourceSelectAllChange(selected: Record[]): void;
handleTargetSelectAllChange(selected: Record[]): void;
selectRecord(value: Record, selected: Record[]): void;
clearCurrentIndex: () => void;
changeOptionIndex: () => void;
handleRemove: (value: any) => void;
updateIndex(): void;
renderWrapper(): JSX.Element;
}