We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 766eb38 commit 708d447Copy full SHA for 708d447
src/components/AddressSearch.js
@@ -107,6 +107,14 @@ const AddressSearch = (props) => {
107
label: props.label,
108
containerStyles: props.containerStyles,
109
errorText: props.errorText,
110
+ onChangeText: (text) => {
111
+ const isTextValid = !_.isEmpty(text) && _.isEqual(text, props.value);
112
+
113
+ // Ensure whether an address is selected already or has address value initialized.
114
+ if (!_.isEmpty(googlePlacesRef.current.getAddressText()) && !isTextValid) {
115
+ saveLocationDetails({});
116
+ }
117
+ },
118
}}
119
styles={{
120
textInputContainer: [styles.flexColumn],
0 commit comments