refactor(web/input): reset input form on close

This commit is contained in:
Luke
2023-01-04 13:52:39 +01:00
parent 855405da77
commit 44c91f1cf4

View File

@@ -48,9 +48,12 @@ const InputDialog: React.FC = () => {
setVisible(false);
});
const handleClose = () => {
const handleClose = async () => {
setVisible(false);
fetchNui('inputData');
await new Promise((resolve) => setTimeout(resolve, 200));
form.reset();
fieldForm.remove();
};
const onSubmit = form.handleSubmit(async (data) => {