mapbox / mapbox/mapbox-gl-geocoder
Bug: function SetInput() when option showSuggestions is set to false, it still shows the suggestions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
The code:
const geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken,
mapboxgl: mapboxgl,
});
if (locationFromUrl && idFromUrl) {
// Reverse geocode to get the place name
reverseGeocode(locationFromUrl[0], locationFromUrl[1], placeIdFromUrl).then(placeName => {
if (placeName) {
geocoder.setInput(placeName, false);
}
});
}
The result:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the geocoder control's setInput function and the handling of the showSuggestions option. Reproduce the supplied MapboxGeocoder example with showSuggestions set to false, then verify that calling setInput does not display suggestions while preserving the input value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100