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

FIX: url doesn't update for subsequent searches #168

Merged

Conversation

michaelkirk
Copy link
Member

FIXES: #166

I left my individual commits in case you want to follow the commit log narrative, but feel free to squash as you see fit:

  • refactor: avoid unnecessary round trip
  • update path on subsequent reloads
  • clearer code
  • restore error handling if given invalid osm_id

Two-way data bindings make it hard to determine cause and effect. Now we
ensure that our "watch" code is only called in response to changes of
the SearchBox, whereas before it was *also* called during initial load.

I also think that now that POI is being handed in, it can't be
undefined within watch, so no need for that fallback.

Further: was their any reason for the async dispatch?
@michaelkirk michaelkirk force-pushed the mkirk/fix-subsequent-pick-routing branch from 22dd834 to 06cc2fa Compare September 21, 2022 22:12
methods: {
poiDisplayName,
poiSelected: function (poi?: POI) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This function just seemed unused.

@michaelkirk
Copy link
Member Author

Also, now is as good a time as any to confess that I've never used vue and in fact have barely done any web development for the last 10 years, so don't hesitate to set me straight when I'm doing something crazy.

@ellenhp
Copy link
Member

ellenhp commented Sep 21, 2022

Hah, I'm not much of a web developer either! This looks good to me. Certainly better than what was there before :) Will test tomorrow.

@ellenhp ellenhp merged commit 4a46098 into headwaymaps:main Sep 23, 2022
@michaelkirk michaelkirk deleted the mkirk/fix-subsequent-pick-routing branch November 10, 2022 20:46
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.

The place URL doesn't update with subsequent searches unless you click "clear"
2 participants