react-arborist 2.2.0 → 2.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/README.md +2 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/interfaces/tree-api.d.ts +1 -0
- package/dist/module.js +5 -2
- package/dist/module.js.map +1 -1
- package/dist/types/tree-props.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/default-container.tsx +2 -2
- package/src/interfaces/tree-api.ts +4 -0
- package/src/types/tree-props.ts +1 -0
package/README.md
CHANGED
|
@@ -96,6 +96,7 @@ function App() {
|
|
|
96
96
|
height={1000}
|
|
97
97
|
indent={24}
|
|
98
98
|
rowHeight={36}
|
|
99
|
+
overscanCount={1}
|
|
99
100
|
paddingTop={30}
|
|
100
101
|
paddingBottom={10}
|
|
101
102
|
padding={25 /* sets both */}
|
|
@@ -281,6 +282,7 @@ interface TreeProps<T> {
|
|
|
281
282
|
|
|
282
283
|
/* Sizes */
|
|
283
284
|
rowHeight?: number;
|
|
285
|
+
overscanCount?: number;
|
|
284
286
|
width?: number;
|
|
285
287
|
height?: number;
|
|
286
288
|
indent?: number;
|
package/dist/index.js
CHANGED
|
@@ -1396,8 +1396,7 @@ function $bb9a1e34249689ac$export$ff4858a4110d9246() {
|
|
|
1396
1396
|
tree.selectAll();
|
|
1397
1397
|
return;
|
|
1398
1398
|
}
|
|
1399
|
-
if (e.key === "a" && !e.metaKey) {
|
|
1400
|
-
if (!tree.props.onCreate) return;
|
|
1399
|
+
if (e.key === "a" && !e.metaKey && tree.props.onCreate) {
|
|
1401
1400
|
tree.createLeaf();
|
|
1402
1401
|
return;
|
|
1403
1402
|
}
|
|
@@ -1474,6 +1473,7 @@ function $bb9a1e34249689ac$export$ff4858a4110d9246() {
|
|
|
1474
1473
|
height: tree.height,
|
|
1475
1474
|
width: tree.width,
|
|
1476
1475
|
itemSize: tree.rowHeight,
|
|
1476
|
+
overscanCount: tree.overscanCount,
|
|
1477
1477
|
itemKey: (index)=>tree.visibleNodes[index]?.id || index,
|
|
1478
1478
|
outerElementType: (0, $0e2adc7837d85ac3$export$70c2b8898b86d3ad),
|
|
1479
1479
|
innerElementType: (0, $472f3c5b35f3bf96$export$a9af0da3ae60cd00),
|
|
@@ -1571,6 +1571,9 @@ class $5c74fef433be2b0a$export$e2da3477247342d1 {
|
|
|
1571
1571
|
get rowHeight() {
|
|
1572
1572
|
return this.props.rowHeight ?? 24;
|
|
1573
1573
|
}
|
|
1574
|
+
get overscanCount() {
|
|
1575
|
+
return this.props.overscanCount ?? 1;
|
|
1576
|
+
}
|
|
1574
1577
|
get searchTerm() {
|
|
1575
1578
|
return (this.props.searchTerm || "").trim();
|
|
1576
1579
|
}
|