Select to view content in your preferred language

Popup component properties do not apply to Search result Popups

469
12
Jump to solution
2 weeks ago
AntonioMedrano
Emerging Contributor

I'd like to set the docking position (or maybe eventually it'll be called slot) for a search result popup. For any standard popup component, this can be done with the following code:

const popupComponent = document.querySelector("arcgis-popup");
popupComponent.dockOptions = {
   buttonEnabled: true,
   position: "bottom-right"
};

Before components, setting the docking position would also apply toward search popups as well, but now it doesn't. How can I modify popup parameters on the search result popup, or even add a new action? Thank you.

0 Kudos
12 Replies
JonathanDawe_BAS
Frequent Contributor

I've reimplemented it now to use the new popup widget, and this works really well! 

JonathanDawe_BAS_0-1761561712634.png

 

AntonioMedrano
Emerging Contributor

Thank you @Noah-Sager and @ReneRubalcava, these are excellent examples showing how to associate a dockOption to standard popups and/or search component popups. So if I'm getting this right for v4.34, in addition to the Search component, also the standard non-search popup associated with the feature layer is still using the popup widget. Only when you import the Popup component, then the standard non-search popup gets replaced with the Popup component version. Is that the right way to think about it?

The complete transition to components is long and full of complexities, but I appreciate you taking the time to explain these quirks that I'm finding as we move towards making the full conversion.

Noah-Sager
Esri Regular Contributor

No problem, @AntonioMedrano. This is a big transition for all of us. Keep posting questions if you run into any issues.

Your understanding is correct. The Popup component is like an opt-in experience.

Here is the key part of the doc:

https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-popup/

 

0 Kudos