mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix(components): only override columns if prefs found
Before this, it didn't matter if a column had show = false as it would default to be show if preferences weren't found.
This commit is contained in:
1 file changed
+9
-6
@@ -31,12 +31,15 @@
|
||||
} else {
|
||||
const prefs = preferences.get($page.route);
|
||||
|
||||
columns.set(
|
||||
$columns.map((column) => {
|
||||
column.show = prefs.columns?.includes(column.id) ?? true;
|
||||
return column;
|
||||
})
|
||||
);
|
||||
// Override the shown columns only if a preference was set
|
||||
if (prefs?.columns) {
|
||||
columns.set(
|
||||
$columns.map((column) => {
|
||||
column.show = prefs.columns?.includes(column.id) ?? true;
|
||||
return column;
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
columns.subscribe((ctx) => {
|
||||
|
||||
Reference in new issue
Block a user