feat: Add defaultHidden column meta property and update reset logic to hide columns

This commit is contained in:
pa
2026-03-17 16:58:28 +09:00
parent 4e6b23cee8
commit e4c5959685
2 changed files with 13 additions and 2 deletions
+11 -1
View File
@@ -539,7 +539,17 @@ export function useVrcxVueTable(options) {
function resetAll() {
columnSizing.value = {};
columnOrder.value = [];
columnVisibility.value = {};
const cols = columnsSource.value ?? [];
const defaultHiddenVisibility = {};
for (const col of cols) {
const id = getColumnId(col);
if (id && col?.meta?.defaultHidden) {
defaultHiddenVisibility[id] = false;
}
}
columnVisibility.value = defaultHiddenVisibility;
removePersisted(['columnSizing', 'columnOrder', 'columnVisibility']);
}