@edux-design/tree-select 0.2.1 → 0.2.2
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/README.md +23 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +14579 -146
- package/dist/index.mjs +14598 -145
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@ TreeSelect renders hierarchical data with expand/collapse controls, optional inl
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
pnpm add @edux-design/tree-select @edux-design/forms @edux-design/buttons @edux-design/icons @edux-design/tooltips @dnd-kit/core @dnd-kit/sortable
|
|
10
|
+
pnpm add @edux-design/tree-select @edux-design/forms @edux-design/buttons @edux-design/icons @edux-design/menus @edux-design/tooltips @dnd-kit/core @dnd-kit/sortable
|
|
11
11
|
# or
|
|
12
|
-
npm install @edux-design/tree-select @edux-design/forms @edux-design/buttons @edux-design/icons @edux-design/tooltips @dnd-kit/core @dnd-kit/sortable
|
|
12
|
+
npm install @edux-design/tree-select @edux-design/forms @edux-design/buttons @edux-design/icons @edux-design/menus @edux-design/tooltips @dnd-kit/core @dnd-kit/sortable
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Peer deps include `react@^19.1.0` and `react-dom@^19.1.0`.
|
|
@@ -143,6 +143,27 @@ Shows a delete action for each item and removes the node (plus descendants).
|
|
|
143
143
|
### `actionButtonsPosition` (`"start"` | `"end"`, default `"start"`)
|
|
144
144
|
Positions the action buttons within a row. `"end"` pushes the actions to the end of the row.
|
|
145
145
|
|
|
146
|
+
### `renderAdditionalActionsMenu` (function)
|
|
147
|
+
Renders a kebab (more actions) menu per row. Return `null`/`undefined` to hide the menu for a given item.
|
|
148
|
+
|
|
149
|
+
```jsx
|
|
150
|
+
import { MenuList, MenuItem } from "@edux-design/menus";
|
|
151
|
+
|
|
152
|
+
<TreeSelect
|
|
153
|
+
data={data}
|
|
154
|
+
renderAdditionalActionsMenu={({ id, node }) => (
|
|
155
|
+
<MenuList>
|
|
156
|
+
<MenuItem onClick={() => console.log("View", id)}>
|
|
157
|
+
View {node.label ?? id}
|
|
158
|
+
</MenuItem>
|
|
159
|
+
<MenuItem onClick={() => console.log("Duplicate", id)}>
|
|
160
|
+
Duplicate
|
|
161
|
+
</MenuItem>
|
|
162
|
+
</MenuList>
|
|
163
|
+
)}
|
|
164
|
+
/>;
|
|
165
|
+
```
|
|
166
|
+
|
|
146
167
|
### `maxLabelLength` (number)
|
|
147
168
|
Limits label width by character count and truncates with an ellipsis when exceeded.
|
|
148
169
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
declare function TreeSelect({ data, onDataChange, allowDragAndDrop, allowMultiDrag, isEditable, allowDelete, useChevron, actionButtonsPosition, maxLabelLength, maxDepth, addChildTooltip, addSiblingTooltip, deleteTooltip, onLabelChange, levelConfig, defaultExpanded, expanded, onExpandedChange, }: {
|
|
3
|
+
declare function TreeSelect({ data, onDataChange, allowDragAndDrop, allowMultiDrag, isEditable, allowDelete, useChevron, actionButtonsPosition, maxLabelLength, maxDepth, addChildTooltip, addSiblingTooltip, deleteTooltip, onLabelChange, levelConfig, defaultExpanded, expanded, onExpandedChange, renderAdditionalActionsMenu, }: {
|
|
4
4
|
data: any;
|
|
5
5
|
onDataChange: any;
|
|
6
6
|
allowDragAndDrop?: boolean;
|
|
@@ -19,6 +19,7 @@ declare function TreeSelect({ data, onDataChange, allowDragAndDrop, allowMultiDr
|
|
|
19
19
|
defaultExpanded: any;
|
|
20
20
|
expanded: any;
|
|
21
21
|
onExpandedChange: any;
|
|
22
|
+
renderAdditionalActionsMenu: any;
|
|
22
23
|
}): react_jsx_runtime.JSX.Element;
|
|
23
24
|
|
|
24
25
|
export { TreeSelect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
declare function TreeSelect({ data, onDataChange, allowDragAndDrop, allowMultiDrag, isEditable, allowDelete, useChevron, actionButtonsPosition, maxLabelLength, maxDepth, addChildTooltip, addSiblingTooltip, deleteTooltip, onLabelChange, levelConfig, defaultExpanded, expanded, onExpandedChange, }: {
|
|
3
|
+
declare function TreeSelect({ data, onDataChange, allowDragAndDrop, allowMultiDrag, isEditable, allowDelete, useChevron, actionButtonsPosition, maxLabelLength, maxDepth, addChildTooltip, addSiblingTooltip, deleteTooltip, onLabelChange, levelConfig, defaultExpanded, expanded, onExpandedChange, renderAdditionalActionsMenu, }: {
|
|
4
4
|
data: any;
|
|
5
5
|
onDataChange: any;
|
|
6
6
|
allowDragAndDrop?: boolean;
|
|
@@ -19,6 +19,7 @@ declare function TreeSelect({ data, onDataChange, allowDragAndDrop, allowMultiDr
|
|
|
19
19
|
defaultExpanded: any;
|
|
20
20
|
expanded: any;
|
|
21
21
|
onExpandedChange: any;
|
|
22
|
+
renderAdditionalActionsMenu: any;
|
|
22
23
|
}): react_jsx_runtime.JSX.Element;
|
|
23
24
|
|
|
24
25
|
export { TreeSelect };
|