Fix ResponseDialog to properly sync its state

This commit is contained in:
Karl Ludwig Weise
2025-09-09 21:11:16 +02:00
parent e408c722e8
commit 70fbd2e8fc
2 changed files with 9 additions and 1 deletions
@@ -68,6 +68,14 @@
return unsubscribe;
});
$effect(() => {
if (open) {
openDialog(id);
} else {
closeDialog(id);
}
});
onDestroy(() => {
responsiveDialogs.update((state) => {
const newState = new Map(state);
@@ -42,7 +42,7 @@
{:then tenants}
<div class="flex flex-col items-start gap-5">
<ResponsiveDialog
id="add-tenant"
id="add"
title={m["tenants.add.title"]()}
description={m["tenants.add.description"]()}
triggerHidden={tenants.length === 0}