From f74a16d2c2ed51e535e7cbc3aa54926e6fb714e4 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 19 Apr 2022 10:44:11 +0200 Subject: [PATCH] fix(web/input): Reset input data state on open When putting data in the fields, after closing the dialog and opening it again the data wouldn't be visible but if you were to press confirm again then it would send the previous data --- web/src/features/dialog/InputDialog.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/features/dialog/InputDialog.tsx b/web/src/features/dialog/InputDialog.tsx index bcb437d..7a98e37 100644 --- a/web/src/features/dialog/InputDialog.tsx +++ b/web/src/features/dialog/InputDialog.tsx @@ -40,6 +40,7 @@ const InputDialog: React.FC = () => { useNuiEvent("openDialog", (data) => { setInputOptions(data); + setInputData([]); setVisible(true); });