From 05bad0a2dd46d987da58d3d83ec1e1e89851d8f9 Mon Sep 17 00:00:00 2001 From: Antonio Vizuete Date: Wed, 5 Oct 2022 15:43:19 +0200 Subject: [PATCH] :rocket: Fit to starndars the ParameterDialog form --- .../QueryForm/components/ParameterDialog.tsx | 67 +++++++++++-------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/src/components/QueryForm/components/ParameterDialog.tsx b/src/components/QueryForm/components/ParameterDialog.tsx index 695e619..83c775f 100644 --- a/src/components/QueryForm/components/ParameterDialog.tsx +++ b/src/components/QueryForm/components/ParameterDialog.tsx @@ -40,7 +40,9 @@ export default function ParameterDialog({ clearState(); }; - const handleOnClickSave = () => { + const handleOnClickSave = (e: React.SyntheticEvent) => { + e.preventDefault(); + e.stopPropagation(); if (key && value) { onConfirm(key, value, data ? "edit" : "new"); clearState(); @@ -53,35 +55,42 @@ export default function ParameterDialog({ isOpen={isOpen} onClose={handleOnClickClose} > -
- - setKey(e.target.value)} - disabled={data !== undefined} - /> - setValue(e.target.value)} - /> - -
-
-
- - +
+
+ + setKey(e.target.value)} + disabled={data !== undefined} + /> + setValue(e.target.value)} + /> +
-
+
+
+ + +
+
+ ); }