import { ReactElement, Ref } from 'react'; import { DialogProps } from '../dialog'; import { OptionType, SelectionContextBaseProps } from '../selectionContext'; import { SelectedListProps } from '../selectedList'; import { Id, SelectableProps } from '../../types'; export type PickerDialogRef = { open(value?: V | V[]): Promise; }; export interface PickerDialogBaseProps, V extends Id = Id> extends Omit, SelectionContextBaseProps { ref?: Ref>; /** 默认的ref已被PickerDialogRef取代,需要dialogRef指向dialog元素 */ dialogRef?: Ref; showSelectedList?: boolean; /** 已选列表的位置,默认为`right` */ selectedListPlacement?: 'left' | 'right'; selectedListProps?: SelectedListProps; selectedItemProps?: SelectedListProps['itemProps']; onConfirm?(value: V | V[]): void; onClear?(): void; /** @alias {@link options} */ rows?: O[]; /** @alias {@link options} */ nodes?: O[]; } export type PickerDialogProps, V extends Id = Id> = PickerDialogBaseProps & SelectableProps; export declare const PickerDialog: , V extends Id = Id>(props: PickerDialogProps) => ReactElement;