Select to view content in your preferred language

4.27 - Popup location issue

424
3
06-29-2023 01:08 AM
michaelkdev
New Contributor III

Popup will not update / trigger change detection when async data is loaded. 

Reproduce:

https://codepen.io/michaelk95/pen/eYQvReQ?editors=1100

Initial popup state: 

init.png

When data is loaded (async)

loaded.png

 The width of the popup should be auto (fit-content)

.esri-popup__main-container {
    width: auto !important;
}

It's only with version 4.27. The popup DOM element should be updated when the popup.content has changed. Can someone have a look? Thanks

0 Kudos
3 Replies
ReneRubalcava
Frequent Contributor II

This works if you remove the custom css you added to modify the popup. You might need to adjust that.

0 Kudos
michaelkdev
New Contributor III

Yes, correct

But it's not possible to set the popup's width to auto? 

For example: 

esri css:

.esri-view-width-large .esri-popup__main-container {
    width:400px;
}
 
But I don't want the popup to have a fixed size, it should fit the content? Not possible?
 
THanks
 

 

0 Kudos
ReneRubalcava
Frequent Contributor II

Not for the popup. If you need something slightly different, you might want to look at the Features widget which lets you place popup content anywhere you want.

https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html

0 Kudos