pinballmap / pbm-react

PBM React Native: iOS & Android Apps
https://pinballmap.com/app
GNU General Public License v3.0
33 stars 9 forks source link

Geocoded searches don't fire until after the loading spinner is done #522

Closed RyanTG closed 8 months ago

RyanTG commented 10 months ago

A geocoded search example is to search by zip code. If you type in a zip code, and then press return while the loading spinner is still spinning, then all that happens is the keyboard get dismissed. But no search occurs.

You then have to click into the input field again and press return again for the geocoded search to happen.

Also, side plug for this issue https://github.com/pinballmap/pbm-react/issues/447 to use our own API for geocoding. As it is, react-geocode kinda sucks, and using our own provides a fallback in the event that the google geocoding fails (which, it does if you search "90210", which is a legit zip code that google somehow doesn't know how to geocode).

bpoore commented 10 months ago

I thought we were intentionally not wanting to allow geocode searches until the other search requests have resolved in order to avoid unnecessarily geocoding. If that's not actually a concern, will take that into account when looking at this, though if geocoding as a last resort is a goal as we look at how to approach a solution for this, I want to have that in mind.

RyanTG commented 10 months ago

Yeah, good point. With that in mind, maybe we need another solution than dismissing the keyboard. As it is, it's pretty confusing for the keyboard to dismiss but nothing happens.

RyanTG commented 8 months ago

I'm not seeing a reliable way to temporarily disable the enter/return key on both platforms. Closing