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

Clear address text result in Geocoder Search field #20

Open
guttormah opened this issue Jun 18, 2020 · 2 comments
Open

Clear address text result in Geocoder Search field #20

guttormah opened this issue Jun 18, 2020 · 2 comments

Comments

@guttormah
Copy link

Hi.

We are very satisfied with the Geocoder Component in most respects.

We have put the Geocoder component outside the react-mapbox-gl component and use it to find adress results resulting from the user choosing one of the address alternatives appearing beneath the address field.

BUT: We are unable to clear the geocoder address field.
We typically use the geocoder in the following manner:

CREATE A NEW ORDER IN AN ORDER FORM:

  • Find an address
  • Fill in other related info
  • Store the result (for exampel an order of some kind)
  • Give a response to the user that the order has been stored including an order reference.
  • When we give the response, we want to clear all the fields in the order form.

We are able to clear all fields, except the geocoder address fields (which are controlled by state variables).
We prefer to use react's rendering functionality (which is ajax like)
We do not want to simulate a complete page render (F5 simulation).

Any clues regarding how we can clear the geocoder address fields would be greatly appreciated.

@mm105
Copy link

mm105 commented Jul 3, 2020

I have same issue. Did you find any solution?

@guttormah
Copy link
Author

guttormah commented Jul 5, 2020 via email

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

No branches or pull requests

2 participants