diff --git a/ka-note/client/src/lib/components/DarkSelect.svelte b/ka-note/client/src/lib/components/DarkSelect.svelte index 1107356..d236be6 100644 --- a/ka-note/client/src/lib/components/DarkSelect.svelte +++ b/ka-note/client/src/lib/components/DarkSelect.svelte @@ -17,6 +17,15 @@ let open = $state(false); let container: HTMLDivElement; + let button: HTMLButtonElement; + let openUp = $state(false); + + function calcDirection() { + if (!button) return; + const rect = button.getBoundingClientRect(); + const spaceBelow = window.innerHeight - rect.bottom; + openUp = spaceBelow < 260; // less than max-h-60 (240px) + margin + } const selected = $derived(options.find(o => o.value === value) ?? options[0]); @@ -35,16 +44,17 @@
{#if open} -
+
{#each options as opt} - +
+
+
+

Gegenstände

+

{filteredAssets.length} Gegenstand{filteredAssets.length !== 1 ? 'stände' : ''}

+
+
+ + +
diff --git a/ka-note/server/ka-note.db-shm b/ka-note/server/ka-note.db-shm index 0266d9e..055d744 100644 Binary files a/ka-note/server/ka-note.db-shm and b/ka-note/server/ka-note.db-shm differ diff --git a/ka-note/server/ka-note.db-wal b/ka-note/server/ka-note.db-wal index 8a5c26e..c316a69 100644 Binary files a/ka-note/server/ka-note.db-wal and b/ka-note/server/ka-note.db-wal differ