@bwp-web/components 1.9.5 → 1.9.6
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/BiampTable/BiampTableColumnVisibility.d.ts.map +1 -1
- package/dist/BiampTable/index.d.ts +1 -1
- package/dist/BiampTable/index.d.ts.map +1 -1
- package/dist/BiampTable/serverSideTableUtils.d.ts +5 -6
- package/dist/BiampTable/serverSideTableUtils.d.ts.map +1 -1
- package/dist/BiampTable/tanstack-meta.d.ts +0 -6
- package/dist/BiampTable/tanstack-meta.d.ts.map +1 -1
- package/dist/BiampTable/useBiampServerSideTable.d.ts.map +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2516,7 +2516,7 @@ function BiampTableColumnVisibility({
|
|
|
2516
2516
|
slotProps,
|
|
2517
2517
|
...popoverProps
|
|
2518
2518
|
}) {
|
|
2519
|
-
const hideableColumns = table.getAllLeafColumns().filter((col) => col.getCanHide()
|
|
2519
|
+
const hideableColumns = table.getAllLeafColumns().filter((col) => col.getCanHide());
|
|
2520
2520
|
const allVisible = hideableColumns.every((col) => col.getIsVisible());
|
|
2521
2521
|
const toggleAllHideable = () => {
|
|
2522
2522
|
const next = !allVisible;
|
|
@@ -3234,10 +3234,10 @@ function getDefaultColumnVisibilityFromDefs(columns) {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
return defaults;
|
|
3236
3236
|
}
|
|
3237
|
-
function
|
|
3237
|
+
function getNonHideableColumnIds(columns) {
|
|
3238
3238
|
const ids = [];
|
|
3239
3239
|
for (const col of columns) {
|
|
3240
|
-
if (col.id != null && col.
|
|
3240
|
+
if (col.id != null && col.enableHiding === false) {
|
|
3241
3241
|
ids.push(col.id);
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
@@ -3278,13 +3278,13 @@ function useBiampServerSideTable({
|
|
|
3278
3278
|
}) {
|
|
3279
3279
|
const {
|
|
3280
3280
|
defaultColumnVisibility,
|
|
3281
|
-
|
|
3281
|
+
nonHideableColumnIds,
|
|
3282
3282
|
columnIdToField,
|
|
3283
3283
|
fieldToColumnId
|
|
3284
3284
|
} = useMemo2(
|
|
3285
3285
|
() => ({
|
|
3286
3286
|
defaultColumnVisibility: getDefaultColumnVisibilityFromDefs(columns),
|
|
3287
|
-
|
|
3287
|
+
nonHideableColumnIds: getNonHideableColumnIds(columns),
|
|
3288
3288
|
...getOrderFieldMappings(columns)
|
|
3289
3289
|
}),
|
|
3290
3290
|
[columns]
|
|
@@ -3308,11 +3308,11 @@ function useBiampServerSideTable({
|
|
|
3308
3308
|
...defaultColumnVisibility,
|
|
3309
3309
|
...columnVisibility
|
|
3310
3310
|
};
|
|
3311
|
-
for (const id of
|
|
3311
|
+
for (const id of nonHideableColumnIds) {
|
|
3312
3312
|
merged[id] = true;
|
|
3313
3313
|
}
|
|
3314
3314
|
return toVisibilityState(merged);
|
|
3315
|
-
}, [defaultColumnVisibility, columnVisibility,
|
|
3315
|
+
}, [defaultColumnVisibility, columnVisibility, nonHideableColumnIds]);
|
|
3316
3316
|
return useReactTable({
|
|
3317
3317
|
data,
|
|
3318
3318
|
columns,
|
|
@@ -3350,7 +3350,7 @@ function useBiampServerSideTable({
|
|
|
3350
3350
|
onColumnVisibilityChange: onColumnVisibilityChange ? (updater) => {
|
|
3351
3351
|
const next = typeof updater === "function" ? updater(mergedVisibility) : updater;
|
|
3352
3352
|
const dirty = getDirtyColumnVisibility(next, defaultColumnVisibility);
|
|
3353
|
-
for (const id of
|
|
3353
|
+
for (const id of nonHideableColumnIds) {
|
|
3354
3354
|
delete dirty[id];
|
|
3355
3355
|
}
|
|
3356
3356
|
onColumnVisibilityChange(dirty);
|
|
@@ -4038,11 +4038,11 @@ export {
|
|
|
4038
4038
|
buildCsvString,
|
|
4039
4039
|
clearDynamicSvgIconCache,
|
|
4040
4040
|
exportToCsv,
|
|
4041
|
-
getAlwaysShowColumnIds,
|
|
4042
4041
|
getColumnVisibilityDirtyCount,
|
|
4043
4042
|
getDefaultColumnVisibility,
|
|
4044
4043
|
getDefaultColumnVisibilityFromDefs,
|
|
4045
4044
|
getDirtyColumnVisibility,
|
|
4045
|
+
getNonHideableColumnIds,
|
|
4046
4046
|
getOrderFieldMappings,
|
|
4047
4047
|
orderToSorting,
|
|
4048
4048
|
rowSelectionToSelectedIds,
|