homeflowjs 1.0.53 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -18,7 +18,8 @@ const AddressLookupInput = ({
18
18
  required,
19
19
  setSelectedAddress,
20
20
  iconStokeInherit,
21
- errorMessage
21
+ errorMessage,
22
+ onClear,
22
23
  }) => {
23
24
  const [locationQuery, setLocationQuery] = useState('');
24
25
  const [suggestions, setSuggestions] = useState([]);
@@ -83,6 +84,9 @@ const AddressLookupInput = ({
83
84
  value: {},
84
85
  error: null,
85
86
  });
87
+ if (onClear) {
88
+ onClear();
89
+ }
86
90
  };
87
91
 
88
92
  // If there is an error remove suggestions
@@ -196,6 +200,7 @@ AddressLookupInput.propTypes = {
196
200
  setSelectedAddress: PropTypes.func,
197
201
  iconStokeInherit: PropTypes.bool,
198
202
  errorMessage: PropTypes.node,
203
+ onClear: PropTypes.func,
199
204
  };
200
205
 
201
206
  AddressLookupInput.defaultProps = {
@@ -207,6 +212,7 @@ AddressLookupInput.defaultProps = {
207
212
  setSelectedAddress: null,
208
213
  iconStokeInherit: true,
209
214
  errorMessage: <span className="input__error">Sorry we couldn't find that address</span>,
215
+ onClear: null,
210
216
  };
211
217
 
212
218
  export default AddressLookupInput;