mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
refactor(web/input): reset input form on close
This commit is contained in:
@@ -48,9 +48,12 @@ const InputDialog: React.FC = () => {
|
|||||||
setVisible(false);
|
setVisible(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = async () => {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
fetchNui('inputData');
|
fetchNui('inputData');
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
||||||
|
form.reset();
|
||||||
|
fieldForm.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = form.handleSubmit(async (data) => {
|
const onSubmit = form.handleSubmit(async (data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user