Skip to content

Commit

Permalink
Reset form and mutation after successful submission
Browse files Browse the repository at this point in the history
  • Loading branch information
samau3 committed Oct 20, 2024
1 parent 896708d commit 318df73
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export default function RegisterPhysician({
const { firstName, middleName, lastName } = result;
const fullName = `${firstName}${middleName ? ' ' + middleName + ' ' : ' '}${lastName}`;
setPhysician(result.id, fullName);
form.reset();
reset();
close();
fetchOptions(fullName);
} catch (error) {
Expand Down

0 comments on commit 318df73

Please sign in to comment.