@snack-uikit/tree 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +6 -5
- package/dist/components/Tree/Tree.d.ts +0 -4
- package/dist/components/Tree/Tree.js +0 -2
- package/dist/constants.d.ts +4 -4
- package/dist/constants.js +4 -5
- package/dist/contexts/TreeContext.js +3 -3
- package/dist/helperComponents/TreeNode/TreeNode.js +1 -1
- package/dist/helperComponents/TreeNode/components/TreeNodeActions.js +1 -1
- package/dist/types.d.ts +5 -4
- package/package.json +8 -8
- package/src/components/Tree/Tree.tsx +7 -7
- package/src/constants.ts +4 -4
- package/src/contexts/TreeContext.tsx +3 -3
- package/src/helperComponents/TreeNode/TreeNode.tsx +3 -3
- package/src/helperComponents/TreeNode/components/TreeNodeActions.tsx +2 -2
- package/src/types.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 0.3.0 (2023-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* **FF-3729:** replace enum with unions ([910db4a](https://github.com/cloud-ru-tech/snack-uikit/commit/910db4aa8231ccbc58e538e5c5c1f461b1dec275))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 0.2.2 (2023-12-07)
|
|
7
18
|
|
|
8
19
|
### Only dependencies have been changed
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
## Example
|
|
9
9
|
|
|
10
|
-
#### selectionMode =
|
|
10
|
+
#### selectionMode = 'single'
|
|
11
11
|
|
|
12
12
|
```typescript jsx
|
|
13
13
|
import { Tree } from '@snack-uikit/tree';
|
|
@@ -18,10 +18,11 @@ const [selectedNode, setSelected] = useState<TreeNodeId>();
|
|
|
18
18
|
|
|
19
19
|
// ...
|
|
20
20
|
|
|
21
|
-
<Tree data={data} selectionMode=
|
|
21
|
+
<Tree data={data} selectionMode='single' selected={selectedNode} onSelect={setSelected} />
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
#### selectionMode =
|
|
24
|
+
#### selectionMode = 'multi'
|
|
25
|
+
|
|
25
26
|
```typescript jsx
|
|
26
27
|
import { Tree } from '@snack-uikit/tree';
|
|
27
28
|
|
|
@@ -31,7 +32,7 @@ const [selectedNodes, setSelected] = useState<TreeNodeId[]>([]);
|
|
|
31
32
|
|
|
32
33
|
// ...
|
|
33
34
|
|
|
34
|
-
<Tree data={data} selectionMode=
|
|
35
|
+
<Tree data={data} selectionMode='multi' selected={selectedNodes} onSelect={setSelected} />
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
|
|
@@ -42,7 +43,7 @@ const [selectedNodes, setSelected] = useState<TreeNodeId[]>([]);
|
|
|
42
43
|
| name | type | default value | description |
|
|
43
44
|
|------|------|---------------|-------------|
|
|
44
45
|
| data* | `TreeNodeProps[]` | - | Данные для отрисовки |
|
|
45
|
-
| selectionMode |
|
|
46
|
+
| selectionMode | "single" \| "multi" | - | Режим выбора элементов: <br> - `Single` - одиночный выбор <br> - `Multi` - множественный выбор |
|
|
46
47
|
| onNodeClick | `OnNodeClick` | - | Обработчик клика по элементу дерева |
|
|
47
48
|
| expandedNodes | `string[]` | - | Состояние для раскрытых элементов |
|
|
48
49
|
| onExpand | `(expandedKeys: string[], nodeId: string) => void` | - | Колбэк при раскрытии/закрытии элементов |
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { WithSupportProps } from '@snack-uikit/utils';
|
|
2
|
-
import { SelectionMode } from '../../constants';
|
|
3
2
|
import { TreeBaseProps } from '../../types';
|
|
4
3
|
export type TreeProps = WithSupportProps<TreeBaseProps>;
|
|
5
4
|
export declare function Tree({ data, selected, selectionMode, onSelect, onNodeClick, onExpand, expandedNodes, nodeActions, parentActions, onDataLoad, showLines, className, ...rest }: TreeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare namespace Tree {
|
|
7
|
-
var selectionModes: typeof SelectionMode;
|
|
8
|
-
}
|
|
@@ -12,7 +12,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import cn from 'classnames';
|
|
14
14
|
import { extractSupportProps } from '@snack-uikit/utils';
|
|
15
|
-
import { SelectionMode } from '../../constants';
|
|
16
15
|
import { TreeContextProvider } from '../../contexts/TreeContext';
|
|
17
16
|
import { TreeItem } from '../../helperComponents';
|
|
18
17
|
import styles from './styles.module.css';
|
|
@@ -32,4 +31,3 @@ export function Tree(_a) {
|
|
|
32
31
|
showLines,
|
|
33
32
|
} }, { children: data.map((node, index) => (_jsx(TreeItem, { node: node, tabIndexAvailable: index === 0 || index === data.length - 1 }, node.id))) })) })));
|
|
34
33
|
}
|
|
35
|
-
Tree.selectionModes = SelectionMode;
|
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
})(SelectionMode || (SelectionMode = {}));
|
|
1
|
+
export const SELECTION_MODE = {
|
|
2
|
+
Single: 'single',
|
|
3
|
+
Multi: 'multi',
|
|
4
|
+
};
|
|
6
5
|
export const TRANSITION_TIMING = {
|
|
7
6
|
accordionFolding: 200,
|
|
8
7
|
};
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { createContext, useCallback, useContext, useMemo, useState } from 'react';
|
|
14
14
|
import { useUncontrolledProp } from 'uncontrollable';
|
|
15
|
-
import {
|
|
15
|
+
import { SELECTION_MODE } from '../constants';
|
|
16
16
|
import { findAllExpandedChildNodeIds, lookupTreeForSelectedNodes } from '../helpers';
|
|
17
17
|
export const TreeContext = createContext({
|
|
18
18
|
data: [],
|
|
@@ -32,8 +32,8 @@ export const TreeContext = createContext({
|
|
|
32
32
|
});
|
|
33
33
|
export function TreeContextProvider({ children, value }) {
|
|
34
34
|
const { onNodeClick: onNodeClickProp, onExpand: onExpandProp, onSelect: onSelectProp, selectionMode, data } = value, props = __rest(value, ["onNodeClick", "onExpand", "onSelect", "selectionMode", "data"]);
|
|
35
|
-
const isMultiSelect = selectionMode ===
|
|
36
|
-
const isSingleSelect = selectionMode ===
|
|
35
|
+
const isMultiSelect = selectionMode === SELECTION_MODE.Multi;
|
|
36
|
+
const isSingleSelect = selectionMode === SELECTION_MODE.Single;
|
|
37
37
|
const [expandedNodes, onExpandHandler] = useUncontrolledProp(value.expandedNodes, value.expandedNodes || [], onExpandProp);
|
|
38
38
|
const onExpand = useCallback(node => {
|
|
39
39
|
const isExpanded = expandedNodes.includes(node.id);
|
|
@@ -137,7 +137,7 @@ export function TreeNode(_a) {
|
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
const getNodeActions = Boolean(nested) ? parentActions : nodeActions;
|
|
140
|
-
return (_jsxs("div", Object.assign({ role: 'presentation', className: cn(styles.treeNode, className) }, extractSupportProps(rest), { "data-node-id": id }, { children: [parentNode && (_jsx(TreeLine, { halfWidth: Boolean(nested), horizontal: true, visible: showLines, "data-test-id": TEST_IDS.line })), !parentNode && !Boolean(nested) && _jsx(TreeLine, { visible: false }), isExpandable && (_jsx(ButtonFunction, { size:
|
|
140
|
+
return (_jsxs("div", Object.assign({ role: 'presentation', className: cn(styles.treeNode, className) }, extractSupportProps(rest), { "data-node-id": id }, { children: [parentNode && (_jsx(TreeLine, { halfWidth: Boolean(nested), horizontal: true, visible: showLines, "data-test-id": TEST_IDS.line })), !parentNode && !Boolean(nested) && _jsx(TreeLine, { visible: false }), isExpandable && (_jsx(ButtonFunction, { size: 'xs', icon: _jsx(ChevronRightSVG, {}), disabled: disabled, loading: isLoading, onClick: onChevronClick, "data-expanded": isExpanded || undefined, className: styles.treeNodeExpandButton, tabIndex: -1, "data-test-id": TEST_IDS.chevron })), _jsxs("div", Object.assign({ role: 'treeitem', "aria-expanded": isExpanded, "aria-selected": isSelected, "aria-disabled": disabled, "data-multiselect": isMultiSelect || undefined, "data-droplist-active": isDroplistOpen || isDroplistTriggerFocused || undefined, onClick: handleClick, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: resetFocusPosition, tabIndex: tabIndexAvailable ? 0 : -1, className: styles.treeNodeContent, "data-test-id": TEST_IDS.item, ref: ref }, { children: [isMultiSelect && (_jsx("div", Object.assign({ className: styles.treeNodeCheckboxWrap }, { children: _jsx(Checkbox, { size: 's', disabled: disabled, checked: !disabled && isSelected, indeterminate: !disabled && !isSelected && (nestedNodesSelection === null || nestedNodesSelection === void 0 ? void 0 : nestedNodesSelection.someSelected), onChange: handleSelect, onClick: stopPropagationClick, "data-test-id": TEST_IDS.checkbox, tabIndex: -1 }) }))), _jsx("div", Object.assign({ className: styles.treeNodeIcon, "data-test-id": TEST_IDS.icon }, { children: treeNodeIcon })), _jsx(Typography.SansBodyM, Object.assign({ tag: 'div', className: styles.treeNodeTitle }, { children: _jsx(TruncateString, { text: title, "data-test-id": TEST_IDS.title }) })), getNodeActions && (_jsx(TreeNodeActions, { getNodeActions: getNodeActions, node: {
|
|
141
141
|
id,
|
|
142
142
|
title,
|
|
143
143
|
disabled,
|
|
@@ -35,5 +35,5 @@ export function TreeNodeActions({ getNodeActions, isDroplistTriggerFocused, focu
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
return (_jsx("div", Object.assign({ role: 'presentation', className: styles.treeNodeActions, "data-focused": isDroplistTriggerFocused || undefined, onClick: stopPropagationClick }, { children: _jsx(Droplist, Object.assign({ open: isDroplistOpen, onOpenChange: setDroplistOpen, onFocusLeave: handleDroplistFocusLeave, firstElementRefCallback: firstElementRefCallback, triggerRef: triggerElementRef, placement:
|
|
38
|
+
return (_jsx("div", Object.assign({ role: 'presentation', className: styles.treeNodeActions, "data-focused": isDroplistTriggerFocused || undefined, onClick: stopPropagationClick }, { children: _jsx(Droplist, Object.assign({ open: isDroplistOpen, onOpenChange: setDroplistOpen, onFocusLeave: handleDroplistFocusLeave, firstElementRefCallback: firstElementRefCallback, triggerRef: triggerElementRef, placement: 'bottom-end', triggerElement: _jsx(ButtonFunction, { size: 'xs', icon: _jsx(KebabSVG, { size: 24 }), onKeyDown: handleKeyDown, onBlur: onBlurActions, tabIndex: -1, "data-test-id": TEST_IDS.droplistTrigger }) }, { children: droplistActions.map(action => (_jsx(Droplist.ItemSingle, Object.assign({}, action, { onKeyDown: handleDroplistItemKeyDown, onClick: e => handleDroplistItemClick(e, action.onClick), "data-test-id": TEST_IDS.droplistAction }), action.option))) })) })));
|
|
39
39
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MouseEvent, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { ItemSingleProps } from '@snack-uikit/droplist';
|
|
3
|
-
import { WithSupportProps } from '@snack-uikit/utils';
|
|
4
|
-
import {
|
|
3
|
+
import { ValueOf, WithSupportProps } from '@snack-uikit/utils';
|
|
4
|
+
import { SELECTION_MODE } from './constants';
|
|
5
|
+
export type SelectionMode = ValueOf<typeof SELECTION_MODE>;
|
|
5
6
|
export type TreeNodeId = string;
|
|
6
7
|
export type BaseTreeNode = WithSupportProps<{
|
|
7
8
|
/** Идентификатор элемента */
|
|
@@ -63,7 +64,7 @@ export type TreeCommonProps = {
|
|
|
63
64
|
className?: string;
|
|
64
65
|
};
|
|
65
66
|
export type TreeSingleSelect = Omit<TreeCommonProps, 'selected'> & {
|
|
66
|
-
selectionMode:
|
|
67
|
+
selectionMode: 'single';
|
|
67
68
|
/** Состояние для выбраного элемента */
|
|
68
69
|
/** <br> - При <strong>selectionMode</strong>=`Single` - принимает строку */
|
|
69
70
|
selected?: TreeNodeId;
|
|
@@ -71,7 +72,7 @@ export type TreeSingleSelect = Omit<TreeCommonProps, 'selected'> & {
|
|
|
71
72
|
onSelect?(selectedKey: TreeNodeId, node: TreeNodeProps): void;
|
|
72
73
|
};
|
|
73
74
|
export type TreeMultiSelect = Omit<TreeCommonProps, 'selected'> & {
|
|
74
|
-
selectionMode:
|
|
75
|
+
selectionMode: 'multi';
|
|
75
76
|
/**
|
|
76
77
|
* Состояние для выбраных элементов:
|
|
77
78
|
* <br> - При <strong>selectionMode</strong>=`Multi` - принимает массив строк
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Tree",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.3.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"license": "Apache-2.0",
|
|
33
33
|
"scripts": {},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@snack-uikit/button": "0.
|
|
36
|
-
"@snack-uikit/droplist": "0.
|
|
35
|
+
"@snack-uikit/button": "0.15.0",
|
|
36
|
+
"@snack-uikit/droplist": "0.12.0",
|
|
37
37
|
"@snack-uikit/icons": "0.19.0",
|
|
38
|
-
"@snack-uikit/toggles": "0.
|
|
39
|
-
"@snack-uikit/truncate-string": "0.
|
|
40
|
-
"@snack-uikit/typography": "0.
|
|
41
|
-
"@snack-uikit/utils": "3.
|
|
38
|
+
"@snack-uikit/toggles": "0.9.0",
|
|
39
|
+
"@snack-uikit/truncate-string": "0.4.0",
|
|
40
|
+
"@snack-uikit/typography": "0.6.0",
|
|
41
|
+
"@snack-uikit/utils": "3.2.0",
|
|
42
42
|
"classnames": "2.3.2",
|
|
43
43
|
"react-transition-state": "2.1.1",
|
|
44
44
|
"uncontrollable": "8.0.4"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "bd39c5e674f3b91b0e2487782a04b15034cf3d8b"
|
|
47
47
|
}
|
|
@@ -2,10 +2,10 @@ import cn from 'classnames';
|
|
|
2
2
|
|
|
3
3
|
import { extractSupportProps, WithSupportProps } from '@snack-uikit/utils';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { SELECTION_MODE } from '../../constants';
|
|
6
6
|
import { TreeContextProvider } from '../../contexts/TreeContext';
|
|
7
7
|
import { TreeItem } from '../../helperComponents';
|
|
8
|
-
import { TreeBaseProps, TreeMultiSelect, TreeNodeId, TreeSingleSelect } from '../../types';
|
|
8
|
+
import { SelectionMode, TreeBaseProps, TreeMultiSelect, TreeNodeId, TreeSingleSelect } from '../../types';
|
|
9
9
|
import styles from './styles.module.scss';
|
|
10
10
|
|
|
11
11
|
export type TreeProps = WithSupportProps<TreeBaseProps>;
|
|
@@ -30,9 +30,11 @@ export function Tree({
|
|
|
30
30
|
<TreeContextProvider
|
|
31
31
|
value={{
|
|
32
32
|
data,
|
|
33
|
-
selected: selected as
|
|
34
|
-
selectionMode: selectionMode as typeof selected extends string
|
|
35
|
-
|
|
33
|
+
selected: selected as SelectionMode extends typeof SELECTION_MODE.Single ? TreeNodeId : TreeNodeId[],
|
|
34
|
+
selectionMode: selectionMode as typeof selected extends string
|
|
35
|
+
? typeof SELECTION_MODE.Single
|
|
36
|
+
: typeof SELECTION_MODE.Multi,
|
|
37
|
+
onSelect: onSelect as SelectionMode extends typeof SELECTION_MODE.Single
|
|
36
38
|
? TreeSingleSelect['onSelect']
|
|
37
39
|
: TreeMultiSelect['onSelect'],
|
|
38
40
|
expandedNodes,
|
|
@@ -51,5 +53,3 @@ export function Tree({
|
|
|
51
53
|
</div>
|
|
52
54
|
);
|
|
53
55
|
}
|
|
54
|
-
|
|
55
|
-
Tree.selectionModes = SelectionMode;
|
package/src/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createContext, Dispatch, ReactNode, SetStateAction, useCallback, useContext, useMemo, useState } from 'react';
|
|
2
2
|
import { useUncontrolledProp } from 'uncontrollable';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { SELECTION_MODE } from '../constants';
|
|
5
5
|
import { findAllExpandedChildNodeIds, lookupTreeForSelectedNodes } from '../helpers';
|
|
6
6
|
import { OnNodeClick, ParentNode, TreeBaseProps, TreeNodeId, TreeNodeProps } from '../types';
|
|
7
7
|
|
|
@@ -51,8 +51,8 @@ export function TreeContextProvider({ children, value }: TreeContextProviderProp
|
|
|
51
51
|
...props
|
|
52
52
|
} = value;
|
|
53
53
|
|
|
54
|
-
const isMultiSelect = selectionMode ===
|
|
55
|
-
const isSingleSelect = selectionMode ===
|
|
54
|
+
const isMultiSelect = selectionMode === SELECTION_MODE.Multi;
|
|
55
|
+
const isSingleSelect = selectionMode === SELECTION_MODE.Single;
|
|
56
56
|
|
|
57
57
|
const [expandedNodes, onExpandHandler] = useUncontrolledProp<TreeNodeId[]>(
|
|
58
58
|
value.expandedNodes,
|
|
@@ -215,7 +215,7 @@ export function TreeNode({
|
|
|
215
215
|
|
|
216
216
|
{isExpandable && (
|
|
217
217
|
<ButtonFunction
|
|
218
|
-
size=
|
|
218
|
+
size='xs'
|
|
219
219
|
icon={<ChevronRightSVG />}
|
|
220
220
|
disabled={disabled}
|
|
221
221
|
loading={isLoading}
|
|
@@ -246,7 +246,7 @@ export function TreeNode({
|
|
|
246
246
|
{isMultiSelect && (
|
|
247
247
|
<div className={styles.treeNodeCheckboxWrap}>
|
|
248
248
|
<Checkbox
|
|
249
|
-
size=
|
|
249
|
+
size='s'
|
|
250
250
|
disabled={disabled}
|
|
251
251
|
checked={!disabled && isSelected}
|
|
252
252
|
indeterminate={!disabled && !isSelected && nestedNodesSelection?.someSelected}
|
|
@@ -262,7 +262,7 @@ export function TreeNode({
|
|
|
262
262
|
{treeNodeIcon}
|
|
263
263
|
</div>
|
|
264
264
|
|
|
265
|
-
<Typography.SansBodyM tag=
|
|
265
|
+
<Typography.SansBodyM tag='div' className={styles.treeNodeTitle}>
|
|
266
266
|
<TruncateString text={title} data-test-id={TEST_IDS.title} />
|
|
267
267
|
</Typography.SansBodyM>
|
|
268
268
|
|
|
@@ -82,10 +82,10 @@ export function TreeNodeActions({
|
|
|
82
82
|
onFocusLeave={handleDroplistFocusLeave}
|
|
83
83
|
firstElementRefCallback={firstElementRefCallback}
|
|
84
84
|
triggerRef={triggerElementRef}
|
|
85
|
-
placement=
|
|
85
|
+
placement='bottom-end'
|
|
86
86
|
triggerElement={
|
|
87
87
|
<ButtonFunction
|
|
88
|
-
size=
|
|
88
|
+
size='xs'
|
|
89
89
|
icon={<KebabSVG size={24} />}
|
|
90
90
|
onKeyDown={handleKeyDown}
|
|
91
91
|
onBlur={onBlurActions}
|
package/src/types.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MouseEvent, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
import { ItemSingleProps } from '@snack-uikit/droplist';
|
|
4
|
-
import { WithSupportProps } from '@snack-uikit/utils';
|
|
4
|
+
import { ValueOf, WithSupportProps } from '@snack-uikit/utils';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { SELECTION_MODE } from './constants';
|
|
7
|
+
|
|
8
|
+
export type SelectionMode = ValueOf<typeof SELECTION_MODE>;
|
|
7
9
|
|
|
8
10
|
export type TreeNodeId = string;
|
|
9
11
|
|
|
@@ -72,7 +74,7 @@ export type TreeCommonProps = {
|
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
export type TreeSingleSelect = Omit<TreeCommonProps, 'selected'> & {
|
|
75
|
-
selectionMode:
|
|
77
|
+
selectionMode: 'single';
|
|
76
78
|
/** Состояние для выбраного элемента */
|
|
77
79
|
/** <br> - При <strong>selectionMode</strong>=`Single` - принимает строку */
|
|
78
80
|
selected?: TreeNodeId;
|
|
@@ -81,7 +83,7 @@ export type TreeSingleSelect = Omit<TreeCommonProps, 'selected'> & {
|
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
export type TreeMultiSelect = Omit<TreeCommonProps, 'selected'> & {
|
|
84
|
-
selectionMode:
|
|
86
|
+
selectionMode: 'multi';
|
|
85
87
|
/**
|
|
86
88
|
* Состояние для выбраных элементов:
|
|
87
89
|
* <br> - При <strong>selectionMode</strong>=`Multi` - принимает массив строк
|