@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.
@@ -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