@tanstack/table-core 8.0.0-alpha.40 → 8.0.0-alpha.41
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/build/cjs/features/Expanding.js +5 -0
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/esm/index.js +5 -0
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +291 -291
- package/build/types/features/Expanding.d.ts +1 -0
- package/build/umd/index.development.js +5 -0
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/features/Expanding.ts +6 -0
|
@@ -33,6 +33,7 @@ export declare type ExpandedInstance<TGenerics extends AnyGenerics> = {
|
|
|
33
33
|
toggleAllRowsExpanded: (expanded?: boolean) => void;
|
|
34
34
|
resetExpanded: () => void;
|
|
35
35
|
getRowCanExpand: (rowId: string) => boolean;
|
|
36
|
+
getCanSomeRowsExpand: () => boolean;
|
|
36
37
|
getIsRowExpanded: (rowId: string) => boolean;
|
|
37
38
|
getToggleExpandedProps: <TGetter extends Getter<ToggleExpandedProps>>(rowId: string, userProps?: TGetter) => undefined | PropGetterValue<ToggleExpandedProps, TGetter>;
|
|
38
39
|
getToggleAllRowsExpandedProps: <TGetter extends Getter<ToggleExpandedProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleExpandedProps, TGetter>;
|
|
@@ -785,6 +785,11 @@
|
|
|
785
785
|
|
|
786
786
|
return (_ref = (_ref2 = (_instance$options$get2 = instance.options.getRowCanExpand == null ? void 0 : instance.options.getRowCanExpand(row)) != null ? _instance$options$get2 : instance.options.enableExpanded) != null ? _ref2 : instance.options.defaultCanExpand) != null ? _ref : !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
787
787
|
},
|
|
788
|
+
getCanSomeRowsExpand: function getCanSomeRowsExpand() {
|
|
789
|
+
return Object.keys(instance.getRowModel().rowsById).some(function (id) {
|
|
790
|
+
return instance.getRowCanExpand(id);
|
|
791
|
+
});
|
|
792
|
+
},
|
|
788
793
|
getToggleExpandedProps: function getToggleExpandedProps(rowId, userProps) {
|
|
789
794
|
var row = instance.getRow(rowId);
|
|
790
795
|
|