Skip to content

Commit

Permalink
Merge pull request #1413 from terrestris/fix-print-reset-fields-on-pl…
Browse files Browse the repository at this point in the history
…ugin

Reset print form fields
  • Loading branch information
mholthausen authored Jan 16, 2024
2 parents dcc5ea7 + 002c8d6 commit 2d6869c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PrintForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,14 @@ export const PrintForm: React.FC<PrintFormProps> = ({
useEffect(() => {
if (active) {
if (!printManager) {
form.resetFields();
initializeMapProvider();
}
} else {
printManager?.shutdownManager();
setPrintManager(null);
}
}, [printManager, active, initializeMapProvider]);
}, [printManager, active, initializeMapProvider, form]);

useEffect(() => {
if (printManager) {
Expand Down

0 comments on commit 2d6869c

Please sign in to comment.