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

setAddressText method not working as intended #947

Open
2 of 4 tasks
Fy50167 opened this issue Sep 19, 2024 · 0 comments
Open
2 of 4 tasks

setAddressText method not working as intended #947

Fy50167 opened this issue Sep 19, 2024 · 0 comments
Labels

Comments

@Fy50167
Copy link

Fy50167 commented Sep 19, 2024

Describe the bug

The setAddressText method doesn't trigger a new api call and thus doesn't actually change the search results

Reproduction - (required - issue will be closed without this)

Steps to reproduce the behavior - a minimal reproducible code example, link to a snack or a repository.

Please provide a FULLY REPRODUCIBLE example.

I have a function that calls the setAddressText() method but it doesn't update my search results.
  const handleClear = () => {
  setQuery("")
  searchRef.current?.setAddressText("")
} 

The component also has a debounce of 2000 ms. When I call the function the search results go away, but then when I start a new query, until that debounce finishes and the new search results are received the previous search results from before I pressed the clear button will be displayed. So if I have a query of "12345", press clear, then type in "56789", the search results for "12345" display for the 2 seconds until the debounced call for "56789" finishes. It looks like this is being cause by the setAddressText method not actually cause a new api call to be sent, which seems like a bug since I can't imagine that that's intended behavior.

Additional context

  • Library Version: [e.g. 1.4.2]

  • React Native Version: [e.g. 0.62.2]

  • iOS

  • Android

  • Web

If you are using expo please indicate here:

  • I am using expo

Add any other context about the problem here, screenshots etc

@Fy50167 Fy50167 added the bug label Sep 19, 2024
@Fy50167 Fy50167 changed the title Bug Report setAddressText method not working as intended Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant