Skip to content

Commit

Permalink
fix(PlaceEditor): Set touched flag on address change to update valida…
Browse files Browse the repository at this point in the history
…tion state.
  • Loading branch information
binh-dam-ibigroup committed Feb 7, 2023
1 parent 31d4152 commit 08c5eb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/user/places/place-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ class PlaceEditor extends Component<
_: IntlShape, // Ignore intl object.
{ location }: { location: Location }
) => {
const { setValues, values } = this.props
const { setTouched, setValues, values } = this.props
const { lat, lon, name } = location
setValues({
...values,
address: name,
lat,
lon
})
setTouched({ address: true })
}

render() {
Expand Down

0 comments on commit 08c5eb2

Please sign in to comment.