diff --git a/src/components/ClientSidebarMenu.vue b/src/components/ClientSidebarMenu.vue index 9fb3e6e..4c66e7f 100644 --- a/src/components/ClientSidebarMenu.vue +++ b/src/components/ClientSidebarMenu.vue @@ -22,8 +22,6 @@ const activeParentKeys = computed(() => new Set(getNavigationParentKeys(visibleN const openedKeys = ref>(new Set(activeParentKeys.value)) function handleToggle(key: string) { - if (activeParentKeys.value.has(key)) return - const next = new Set(openedKeys.value) if (next.has(key)) next.delete(key) else next.add(key) diff --git a/src/components/common/DataTable.test.mjs b/src/components/common/DataTable.test.mjs new file mode 100644 index 0000000..4466aa9 --- /dev/null +++ b/src/components/common/DataTable.test.mjs @@ -0,0 +1,11 @@ +import assert from 'node:assert/strict' +import { readFileSync } from 'node:fs' +import test from 'node:test' + +const source = readFileSync(new URL('./DataTable.vue', import.meta.url), 'utf8') + +test('keeps action-only table toolbars on the left', () => { + assert.match(source, /'data-table__toolbar--actions-only': !\$slots\.toolbar/) + assert.match(source, /v-if="\$slots\.toolbar" class="data-table__toolbar-heading"/) + assert.match(source, /\.data-table__toolbar--actions-only \{ justify-content: flex-start; \}/) +}) diff --git a/src/components/common/DataTable.vue b/src/components/common/DataTable.vue index 815b751..3ef382c 100644 --- a/src/components/common/DataTable.vue +++ b/src/components/common/DataTable.vue @@ -143,8 +143,8 @@ function setPage(value: number) {