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