1 | import React from 'react';
|
2 | import { TreeViewDataItem } from './TreeView';
|
3 | export interface TreeViewCheckProps extends Partial<React.InputHTMLAttributes<HTMLInputElement>> {
|
4 | checked?: boolean | null;
|
5 | }
|
6 | export interface TreeViewListItemProps {
|
7 | /** Internal content of a tree view item */
|
8 | name: React.ReactNode;
|
9 | /** Title a tree view item */
|
10 | title: React.ReactNode;
|
11 | /** ID of a tree view item */
|
12 | id?: string;
|
13 | /** Flag indicating if the node is expanded, overrides internal state */
|
14 | isExpanded?: boolean;
|
15 | /** Flag indicating if node is expanded by default */
|
16 | defaultExpanded?: boolean;
|
17 | /** Child nodes of a tree view item */
|
18 | children?: React.ReactNode;
|
19 | /** Callback for item selection. Note: calling event.preventDefault() will prevent the node from toggling. */
|
20 | onSelect?: (event: React.MouseEvent, item: TreeViewDataItem, parent: TreeViewDataItem) => void;
|
21 | /** Callback for item checkbox selection */
|
22 | onCheck?: (event: React.ChangeEvent, item: TreeViewDataItem, parent: TreeViewDataItem) => void;
|
23 | /** Flag indicating if a tree view item has a checkbox */
|
24 | hasCheck?: boolean;
|
25 | /** Additional properties of the tree view item checkbox */
|
26 | checkProps?: TreeViewCheckProps;
|
27 | /** Flag indicating if a tree view item has a badge */
|
28 | hasBadge?: boolean;
|
29 | /** Optional prop for custom badge */
|
30 | customBadgeContent?: React.ReactNode;
|
31 | /** Additional properties of the tree view item badge */
|
32 | badgeProps?: any;
|
33 | /** Flag indicating if the tree view is using a compact variation. */
|
34 | isCompact?: boolean;
|
35 | /** Active items of tree view */
|
36 | activeItems?: TreeViewDataItem[];
|
37 | /** Data structure of tree view item */
|
38 | itemData?: TreeViewDataItem;
|
39 | /** Parent item of tree view item */
|
40 | parentItem?: TreeViewDataItem;
|
41 | /** Default icon of a tree view item */
|
42 | icon?: React.ReactNode;
|
43 | /** Expanded icon of a tree view item */
|
44 | expandedIcon?: React.ReactNode;
|
45 | /** Action of a tree view item, can be a Button or Dropdown */
|
46 | action?: React.ReactNode;
|
47 | /** Callback for item comparison function */
|
48 | compareItems?: (item: TreeViewDataItem, itemToCheck: TreeViewDataItem) => boolean;
|
49 | /** Flag indicating the TreeView should utilize memoization to help render large data sets. Setting this property requires that `activeItems` pass in an array containing every node in the selected item's path. */
|
50 | useMemo?: boolean;
|
51 | }
|
52 | export declare const TreeViewListItem: React.NamedExoticComponent<TreeViewListItemProps>;
|
53 | //# sourceMappingURL=TreeViewListItem.d.ts.map |
\ | No newline at end of file |