UNPKG

2.83 kBTypeScriptView Raw
1import * as React from 'react';
2import { DualListSelectorTreeItemData } from './DualListSelectorTree';
3export interface DualListSelectorPaneProps {
4 /** Additional classes applied to the dual list selector pane. */
5 className?: string;
6 /** A dual list selector list or dual list selector tree to be rendered in the pane. */
7 children?: React.ReactNode;
8 /** Flag indicating if this pane is the chosen pane. */
9 isChosen?: boolean;
10 /** Status to display above the pane. */
11 status?: string;
12 /** Title of the pane. */
13 title?: React.ReactNode;
14 /** A search input placed above the list at the top of the pane, before actions. */
15 searchInput?: React.ReactNode;
16 /** Actions to place above the pane. */
17 actions?: React.ReactNode[];
18 /** Id of the pane. */
19 id?: string;
20 /** @hide Options to list in the pane. */
21 options?: React.ReactNode[];
22 /** @hide Options currently selected in the pane. */
23 selectedOptions?: string[] | number[];
24 /** @hide Callback for when an option is selected. Optionally used only when options prop is provided. */
25 onOptionSelect?: (e: React.MouseEvent | React.ChangeEvent | React.KeyboardEvent, index: number, isChosen: boolean, id?: string, itemData?: any, parentData?: any) => void;
26 /** @hide Callback for when a tree option is checked. Optionally used only when options prop is provided. */
27 onOptionCheck?: (evt: React.MouseEvent | React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent, isChecked: boolean, itemData: DualListSelectorTreeItemData) => void;
28 /** @hide Flag indicating a dynamically built search bar should be included above the pane. */
29 isSearchable?: boolean;
30 /** Flag indicating whether the component is disabled. */
31 isDisabled?: boolean;
32 /** Callback for search input. To be used when isSearchable is true. */
33 onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void;
34 /** @hide A callback for when the search input value for changes. To be used when isSearchable is true. */
35 onSearchInputChanged?: (value: string, event: React.FormEvent<HTMLInputElement>) => void;
36 /** @hide Filter function for custom filtering based on search string. To be used when isSearchable is true. */
37 filterOption?: (option: React.ReactNode, input: string) => boolean;
38 /** @hide Accessible label for the search input. To be used when isSearchable is true. */
39 searchInputAriaLabel?: string;
40 /** @hide Callback for updating the filtered options in DualListSelector. To be used when isSearchable is true. */
41 onFilterUpdate?: (newFilteredOptions: React.ReactNode[], paneType: string, isSearchReset: boolean) => void;
42}
43export declare const DualListSelectorPane: React.FunctionComponent<DualListSelectorPaneProps>;
44//# sourceMappingURL=DualListSelectorPane.d.ts.map
\No newline at end of file