Skip to content

Clear address text result in Geocoder Search field  #20

@guttormah

Description

@guttormah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions