schummar-table 0.10.2 → 0.10.3
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/dist/cjs/index.js +6 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.js +6 -5
- package/dist/es/index.js.map +1 -1
- package/package.json +5 -5
package/dist/es/index.js
CHANGED
|
@@ -1266,17 +1266,18 @@ function ExpandControl({
|
|
|
1266
1266
|
activeItemsById
|
|
1267
1267
|
} = table.getState();
|
|
1268
1268
|
const newExpanded = new Set(expanded);
|
|
1269
|
-
if (expandOnlyOne)
|
|
1269
|
+
if (expandOnlyOne) {
|
|
1270
1270
|
newExpanded.clear();
|
|
1271
|
-
if (isExpanded)
|
|
1272
|
-
newExpanded.delete(itemId);
|
|
1273
|
-
else {
|
|
1274
|
-
newExpanded.add(itemId);
|
|
1275
1271
|
const item = activeItemsById.get(itemId);
|
|
1276
1272
|
for (const ancestor of item ? getAncestors(activeItemsById, item) : []) {
|
|
1277
1273
|
newExpanded.add(ancestor);
|
|
1278
1274
|
}
|
|
1279
1275
|
}
|
|
1276
|
+
if (isExpanded) {
|
|
1277
|
+
newExpanded.delete(itemId);
|
|
1278
|
+
} else {
|
|
1279
|
+
newExpanded.add(itemId);
|
|
1280
|
+
}
|
|
1280
1281
|
onExpandedChange == null ? void 0 : onExpandedChange(newExpanded);
|
|
1281
1282
|
if (!controlledExpanded) {
|
|
1282
1283
|
table.update((state) => {
|