react-native-google-places-autocomplete icon indicating copy to clipboard operation
react-native-google-places-autocomplete copied to clipboard

Support programatically updating text *and* perform search

Open jkjustjoshing opened this issue 2 years ago • 1 comments

I want to be able to programatically specify a new text value to put into the input. This is currently possible using a ref with ref.current.setAddressText('my new text'). However, I want to also perform a Google Places search and show the autocomplete list of items that match the new text in the field.

This would be possible if the following function was exposed from the ref alongside setAddressText:

triggerSearch: (address) => {
  setStateText(address);
  debounceData(address);
}

This can be added to the useImperativeHandle call.

Let me know if you'd be interested in me creating this PR and updating the documentation.

jkjustjoshing avatar May 16 '23 15:05 jkjustjoshing

is this solved?

Knightabhi avatar Jul 19 '23 12:07 Knightabhi