debug and make better data structure for hiding items in material react table hide part

This commit is contained in:
2024-08-06 15:48:50 +03:30
parent 2c68c576ce
commit d630ab7722
3 changed files with 27 additions and 67 deletions

View File

@@ -60,8 +60,6 @@ const DataTableProvider = ({ children, user_id, page_name, table_name, columns }
return columns.reduce((acc, column) => {
const columnId = column.id;
const storeHide = settingStore?.[user_id]?.[page_name]?.[table_name]?.["hides"]?.[columnId];
// If the column has nested columns, process them recursively
if (column.columns && column.columns.length > 0) {
acc[columnId] = getHideValues(column.columns);
} else {