UNPKG

2.02 kBTypeScriptView Raw
1import * as React from 'react';
2export interface DualListSelectorTreeItemData {
3 /** Content rendered inside the dual list selector. */
4 children?: DualListSelectorTreeItemData[];
5 /** Additional classes applied to the dual list selector. */
6 className?: string;
7 /** Flag indicating this option is expanded by default. */
8 defaultExpanded?: boolean;
9 /** Flag indicating this option has a badge */
10 hasBadge?: boolean;
11 /** Callback fired when an option is checked */
12 onOptionCheck?: (event: React.MouseEvent | React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent, isChecked: boolean, isChosen: boolean, itemData: DualListSelectorTreeItemData) => void;
13 /** ID of the option */
14 id: string;
15 /** Text of the option */
16 text: string;
17 /** Parent id of an option */
18 parentId?: string;
19 /** Checked state of the option */
20 isChecked: boolean;
21 /** Additional properties to pass to the option checkbox */
22 checkProps?: any;
23 /** Additional properties to pass to the option badge */
24 badgeProps?: any;
25 /** Flag indicating whether the component is disabled. */
26 isDisabled?: boolean;
27}
28export interface DualListSelectorTreeProps {
29 /** Data of the tree view */
30 data: DualListSelectorTreeItemData[] | (() => DualListSelectorTreeItemData[]);
31 /** ID of the tree view */
32 id?: string;
33 /** @hide Flag indicating if the list is nested */
34 isNested?: boolean;
35 /** Flag indicating if all options should have badges */
36 hasBadges?: boolean;
37 /** Sets the default expanded behavior */
38 defaultAllExpanded?: boolean;
39 /** Callback fired when an option is checked */
40 isDisabled?: boolean;
41 onOptionCheck?: (event: React.MouseEvent | React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent, isChecked: boolean, itemData: DualListSelectorTreeItemData) => void;
42}
43export declare const DualListSelectorTree: React.FunctionComponent<DualListSelectorTreeProps>;
44//# sourceMappingURL=DualListSelectorTree.d.ts.map
\No newline at end of file