Skip to content

Commit

Permalink
refactor: form needs to be made dirty after picker selection
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonlunn committed May 16, 2024
1 parent 72e7875 commit 7123fc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/maps/CoordinatePickerMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const CoordinatePickerMap: React.FC<CoordinatePickerMapProps> = ({

const confirmSelection = (): void => {
if (selectedCoord != null) {
setValue('latlngStr', `${selectedCoord[1].toFixed(5)},${selectedCoord[0].toFixed(5)}`)
setValue('latlngStr', `${selectedCoord[1].toFixed(5)},${selectedCoord[0].toFixed(5)}`, { shouldDirty: true, shouldValidate: true })
}
if ((onCoordinateConfirmed != null) && (selectedCoord != null)) {
onCoordinateConfirmed(selectedCoord)
Expand Down

0 comments on commit 7123fc3

Please sign in to comment.