Skip to content

Commit

Permalink
Clear form on mandate change.
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippluca committed Jan 14, 2025
1 parent 5aaa6a0 commit d00e062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Geopilot.Frontend/src/pages/delivery/deliverySubmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export const DeliverySubmit = () => {
};

const handleMandateChange = (mandateId: number) => {
formMethods.setValue("precursor", undefined);
formMethods.reset();
formMethods.setValue("mandate", mandateId);
if (mandateId) {
fetchApi<Delivery[]>("/api/v1/delivery?" + new URLSearchParams({ mandateId: mandateId.toString() })).then(
setPreviousDeliveries,
Expand Down

0 comments on commit d00e062

Please sign in to comment.