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
This commit is contained in:
Luke
2022-04-19 10:44:11 +02:00
parent 4464b0ec57
commit f74a16d2c2

View File

@@ -40,6 +40,7 @@ const InputDialog: React.FC = () => {
useNuiEvent<Props>("openDialog", (data) => { useNuiEvent<Props>("openDialog", (data) => {
setInputOptions(data); setInputOptions(data);
setInputData([]);
setVisible(true); setVisible(true);
}); });