Open dev7ch opened 1 year ago
Would be great to have! We now have to resort to hacky mutation observer fixes:
(function () {
// Create a new MutationObserver instance
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.type === 'childList') {
var noResults = document.querySelector('.mapbox-gl-geocoder--no-results');
if (noResults && noResults.innerText === "No results found") {
noResults.innerHTML = 'Geen resultaten gevonden.';
}
}
});
});
// Select the target node for observing changes
const targetNode = document.getElementsByClassName('suggestions')[0];
// Set up the observer configuration
const config = { childList: true, subtree: true };
// Start observing the target node for configured mutations
observer.observe(targetNode, config);
})();
This should add a dynamic label for "No results found", related to #328
Disclaimer: not tested, just a walk by fix, hopefully it fits
npm run docs
and commit changes to API.mdmaster
heading before merging