From 0d6988680c1b7cc255eb305042a171a70a62081a Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 30 May 2023 18:51:25 +0000 Subject: [PATCH] fix(site): Confirm delete on press Enter in delete dialog --- .../Dialogs/DeleteDialog/DeleteDialog.tsx | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx b/site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx index cd1749d0627ed..0a56fe65b25c6 100644 --- a/site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx +++ b/site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx @@ -41,20 +41,29 @@ export const DeleteDialog: FC> = ({

{t("deleteDialog.confirm", { entity })}

- +
{ + e.preventDefault() + if (confirmed) { + onConfirm() + } + }} + > + + ) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy