diff --git a/frontend/src/components/grid.svelte b/frontend/src/components/grid.svelte index 8ee7cf0..675c495 100644 --- a/frontend/src/components/grid.svelte +++ b/frontend/src/components/grid.svelte @@ -45,11 +45,10 @@ dispatch('selectChild', childKey); } - function toggleChildren(itemKey, closeAll) { + function toggleChildren(itemKey, shift) { childrenOpen[itemKey] = !childrenOpen[itemKey]; - if (closeAll) { - childrenOpen = {}; - dispatch('closeAll'); + if (shift) { + closeAll(); } } @@ -81,6 +80,11 @@ } return String(value).slice(0, 1000) + '…'; } + + function closeAll() { + childrenOpen = {}; + dispatch('closeAll'); + }