mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
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:
@@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user