Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: replace onClose with onOpenChange in labels settings dialogs

Glen Ederad0b0daf07de
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx
index 89de3595c..e6b3dbfaf 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/workspace/labels.tsx
@@ -330,7 +330,10 @@ function RouteComponent() {
</div>
{/* Create Dialog */}
- <Dialog open={createOpen} onClose={() => setCreateOpen(false)}>
+ <Dialog
+ open={createOpen}
+ onOpenChange={(open) => !open && setCreateOpen(false)}
+ >
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>
@@ -414,9 +417,11 @@ function RouteComponent() {
{/* Edit Dialog */}
<Dialog
open={editOpen}
- onClose={() => {
- setEditOpen(false);
- setEditingLabel(null);
+ onOpenChange={(open) => {
+ if (!open) {
+ setEditOpen(false);
+ setEditingLabel(null);
+ }
}}
>
<DialogContent className="sm:max-w-md">
@@ -507,9 +512,11 @@ function RouteComponent() {
{/* Delete Confirmation */}
<AlertDialog
open={deleteOpen}
- onClose={() => {
- setDeleteOpen(false);
- setDeletingLabel(null);
+ onOpenChange={(open) => {
+ if (!open) {
+ setDeleteOpen(false);
+ setDeletingLabel(null);
+ }
}}
>
<AlertDialogContent>