Is your feature request related to a problem? Please describe.
I added the PlaceAutocompleteElement to a map, and when I select a location I also add a pin.
When I clear the input, I’d like to remove that pin as well. However, there’s currently no way to detect when the built-in clear (“X”) button is pressed.
Since the button lives inside a closed shadow root, developers can’t attach their own event listeners as a workaround.
Describe the solution you'd like
Expose a new event (e.g., clear, input-clear, etc.) that fires whenever the clear button is clicked.
Alternatively, allow developers to pass a handler or listen to an existing DOM event for this action.
Describe alternatives you've considered
None
Additional context
Just like there’s a gmp-select event when a place is chosen, it would be very convenient to also have a corresponding clear event for when the input is reset.
Is your feature request related to a problem? Please describe.
I added the PlaceAutocompleteElement to a map, and when I select a location I also add a pin.
When I clear the input, I’d like to remove that pin as well. However, there’s currently no way to detect when the built-in clear (“X”) button is pressed.
Since the button lives inside a closed shadow root, developers can’t attach their own event listeners as a workaround.
Describe the solution you'd like
Expose a new event (e.g., clear, input-clear, etc.) that fires whenever the clear button is clicked.
Alternatively, allow developers to pass a handler or listen to an existing DOM event for this action.
Describe alternatives you've considered
None
Additional context
Just like there’s a gmp-select event when a place is chosen, it would be very convenient to also have a corresponding clear event for when the input is reset.