Skip to content

Conversation

joshreisner
Copy link
Contributor

@joshreisner joshreisner commented Nov 10, 2023

this is weird, i'm not sure how long "near location" search has not been working

seems the problem is onSubmit is not firing, the simplest solution i found was to add a hidden submit button

alternately we could listen for the enter key in the input onChange and fire locationSearch if mode === "location"

could not tell from the history when this stopped working

closes #342

@joshreisner joshreisner self-assigned this Nov 10, 2023
Copy link

netlify bot commented Nov 10, 2023

Deploy Preview for tsml-ui ready!

Name Link
🔨 Latest commit 76ab794
🔍 Latest deploy log https://app.netlify.com/sites/tsml-ui/deploys/654e7154bd416a0009098282
😎 Deploy Preview https://deploy-preview-344--tsml-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@joshreisner
Copy link
Contributor Author

to see the problem, go to this link and search for sap center

to see the fix, go to this link and search sap center

state.input.mode === 'location' ? search : state.input.search
}
/>
<input type="submit" hidden />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to add this.
Also not sure how this was working before the enter key press behavior seems sort of unpredictable currently.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe because there are buttons in the

field the browser might be interpreting one of those as a submit?

@joshreisner joshreisner merged commit 6fc7fa6 into main Nov 10, 2023
@joshreisner joshreisner deleted the location-search branch November 10, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Near location search not working

2 participants