@tanstack/table-core 8.0.0-alpha.85 → 8.0.0-alpha.86
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 +0 -1
- package/build/cjs/features/Expanding.js.map +1 -1
- package/build/cjs/features/Visibility.js +0 -5
- package/build/cjs/features/Visibility.js.map +1 -1
- package/build/cjs/utils/getExpandedRowModel.js +2 -2
- package/build/cjs/utils/getExpandedRowModel.js.map +1 -1
- package/build/cjs/utils/getPaginationRowModel.js +1 -1
- package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
- package/build/esm/index.js +3 -9
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +314 -314
- package/build/types/features/Expanding.d.ts +0 -1
- package/build/types/features/Visibility.d.ts +5 -6
- package/build/umd/index.development.js +3 -9
- 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 +0 -2
- package/src/features/Visibility.ts +7 -16
- package/src/utils/getExpandedRowModel.ts +1 -5
|
@@ -18,7 +18,6 @@ export declare type ExpandedOptions<TGenerics extends TableGenerics> = {
|
|
|
18
18
|
autoResetExpanded?: boolean;
|
|
19
19
|
enableExpanding?: boolean;
|
|
20
20
|
getExpandedRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
21
|
-
expandSubRows?: boolean;
|
|
22
21
|
getIsRowExpanded?: (row: Row<TGenerics>) => boolean;
|
|
23
22
|
getRowCanExpand?: (row: Row<TGenerics>) => boolean;
|
|
24
23
|
paginateExpandedRows?: boolean;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { TableFeature } from '../core/instance';
|
|
2
2
|
import { Cell, Column, OnChangeFn, TableGenerics, Updater } from '../types';
|
|
3
|
+
export declare type VisibilityState = Record<string, boolean>;
|
|
4
|
+
export declare type VisibilityTableState = {
|
|
5
|
+
columnVisibility: VisibilityState;
|
|
6
|
+
};
|
|
3
7
|
export declare type VisibilityOptions = {
|
|
4
8
|
onColumnVisibilityChange?: OnChangeFn<VisibilityState>;
|
|
5
9
|
enableHiding?: boolean;
|
|
@@ -7,10 +11,6 @@ export declare type VisibilityOptions = {
|
|
|
7
11
|
export declare type VisibilityDefaultOptions = {
|
|
8
12
|
onColumnVisibilityChange: OnChangeFn<VisibilityState>;
|
|
9
13
|
};
|
|
10
|
-
export declare type VisibilityState = Record<string, boolean>;
|
|
11
|
-
export declare type VisibilityTableState = {
|
|
12
|
-
columnVisibility: VisibilityState;
|
|
13
|
-
};
|
|
14
14
|
export declare type VisibilityInstance<TGenerics extends TableGenerics> = {
|
|
15
15
|
getVisibleFlatColumns: () => Column<TGenerics>[];
|
|
16
16
|
getVisibleLeafColumns: () => Column<TGenerics>[];
|
|
@@ -22,11 +22,10 @@ export declare type VisibilityInstance<TGenerics extends TableGenerics> = {
|
|
|
22
22
|
toggleAllColumnsVisible: (value?: boolean) => void;
|
|
23
23
|
getIsAllColumnsVisible: () => boolean;
|
|
24
24
|
getIsSomeColumnsVisible: () => boolean;
|
|
25
|
-
getToggleAllColumnsVisibilityHandler: () =>
|
|
25
|
+
getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void;
|
|
26
26
|
};
|
|
27
27
|
export declare type VisibilityColumnDef = {
|
|
28
28
|
enableHiding?: boolean;
|
|
29
|
-
defaultIsVisible?: boolean;
|
|
30
29
|
};
|
|
31
30
|
export declare type VisibilityRow<TGenerics extends TableGenerics> = {
|
|
32
31
|
_getAllVisibleCells: () => Cell<TGenerics>[];
|
|
@@ -819,7 +819,6 @@
|
|
|
819
819
|
return {
|
|
820
820
|
onExpandedChange: makeStateUpdater('expanded', instance),
|
|
821
821
|
autoResetExpanded: true,
|
|
822
|
-
expandSubRows: true,
|
|
823
822
|
paginateExpandedRows: true
|
|
824
823
|
};
|
|
825
824
|
},
|
|
@@ -2661,11 +2660,6 @@
|
|
|
2661
2660
|
onColumnVisibilityChange: makeStateUpdater('columnVisibility', instance)
|
|
2662
2661
|
};
|
|
2663
2662
|
},
|
|
2664
|
-
getDefaultColumnDef: () => {
|
|
2665
|
-
return {
|
|
2666
|
-
defaultIsVisible: true
|
|
2667
|
-
};
|
|
2668
|
-
},
|
|
2669
2663
|
createColumn: (column, instance) => {
|
|
2670
2664
|
return {
|
|
2671
2665
|
toggleVisibility: value => {
|
|
@@ -3739,7 +3733,7 @@
|
|
|
3739
3733
|
return rowModel;
|
|
3740
3734
|
}
|
|
3741
3735
|
|
|
3742
|
-
return expandRows(rowModel
|
|
3736
|
+
return expandRows(rowModel);
|
|
3743
3737
|
}, {
|
|
3744
3738
|
key: 'getExpandedRowModel',
|
|
3745
3739
|
debug: () => {
|
|
@@ -3757,7 +3751,7 @@
|
|
|
3757
3751
|
|
|
3758
3752
|
expandedRows.push(row);
|
|
3759
3753
|
|
|
3760
|
-
if (
|
|
3754
|
+
if ((_row$subRows = row.subRows) != null && _row$subRows.length && row.getIsExpanded()) {
|
|
3761
3755
|
row.subRows.forEach(handleRow);
|
|
3762
3756
|
}
|
|
3763
3757
|
};
|
|
@@ -3794,7 +3788,7 @@
|
|
|
3794
3788
|
rows,
|
|
3795
3789
|
flatRows,
|
|
3796
3790
|
rowsById
|
|
3797
|
-
}
|
|
3791
|
+
});
|
|
3798
3792
|
}
|
|
3799
3793
|
|
|
3800
3794
|
return {
|