@tanstack/table-core 8.3.0 → 8.3.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/build/cjs/core/column.js.map +1 -1
- package/build/cjs/features/RowSelection.js +3 -2
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/esm/index.js +3 -2
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +308 -308
- package/build/types/index.d.ts +2 -2
- package/build/umd/index.development.js +3 -2
- 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/core/column.ts +1 -1
- package/src/features/RowSelection.ts +5 -7
- package/src/types.ts +1 -1
package/build/types/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ declare type CoreColumnDefBase<TData extends RowData, TValue> = {
|
|
|
77
77
|
header?: ColumnDefTemplate<HeaderContext<TData, TValue>>;
|
|
78
78
|
footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>;
|
|
79
79
|
cell?: ColumnDefTemplate<CellContext<TData, TValue>>;
|
|
80
|
-
meta?: ColumnMeta
|
|
80
|
+
meta?: ColumnMeta<TData, TValue>;
|
|
81
81
|
};
|
|
82
82
|
declare type CoreColumnDefDisplay<TData extends RowData, TValue> = CoreColumnDefBase<TData, TValue> & {
|
|
83
83
|
id: string;
|
|
@@ -634,7 +634,7 @@ declare const createRow: <TData extends unknown>(table: Table<TData>, id: string
|
|
|
634
634
|
|
|
635
635
|
interface TableMeta {
|
|
636
636
|
}
|
|
637
|
-
interface ColumnMeta {
|
|
637
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
638
638
|
}
|
|
639
639
|
interface FilterMeta {
|
|
640
640
|
}
|
|
@@ -2148,7 +2148,7 @@
|
|
|
2148
2148
|
let isAllRowsSelected = Boolean(preFilteredFlatRows.length && Object.keys(rowSelection).length);
|
|
2149
2149
|
|
|
2150
2150
|
if (isAllRowsSelected) {
|
|
2151
|
-
if (preFilteredFlatRows.some(row => !rowSelection[row.id])) {
|
|
2151
|
+
if (preFilteredFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
|
|
2152
2152
|
isAllRowsSelected = false;
|
|
2153
2153
|
}
|
|
2154
2154
|
}
|
|
@@ -2171,7 +2171,8 @@
|
|
|
2171
2171
|
getIsSomeRowsSelected: () => {
|
|
2172
2172
|
var _table$getState$rowSe;
|
|
2173
2173
|
|
|
2174
|
-
|
|
2174
|
+
const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
|
|
2175
|
+
return totalSelected > 0 && totalSelected < table.getCoreRowModel().flatRows.length;
|
|
2175
2176
|
},
|
|
2176
2177
|
getIsSomePageRowsSelected: () => {
|
|
2177
2178
|
const paginationFlatRows = table.getPaginationRowModel().flatRows;
|