Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PC-32282)[PRO] fix: Don't reset location label in generic function #14545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export const OfferLocation = ({ venue }: OfferLocationProps): JSX.Element => {
])
} else {
await resetAddressFields({ formik })
await formik.setFieldValue('locationLabel', '')
await formik.setFieldTouched('locationLabel', false)
Comment on lines +65 to +66
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est pas ce qui est fait dans resetAddressFields ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Au départ si, mais resetAddressFields est appelé à deux endroits, et pour l'un des deux on ne souhaite pas réinitialiser le champs "label" (origine du ticket)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah d'accord !

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const fieldsNames = [
'longitude',
'coords',
'banId',
'locationLabel',
'search-addressAutocomplete',
'addressAutocomplete',
]
Expand Down
Loading