Select to view content in your preferred language

Custom Component Slots - slot="manual"

317
2
03-05-2026 09:35 AM
MatthewDriscoll
MVP Alum

Esri Team,

If we create custom div(s) is it best practice to keep them outside of the <calcite-shell> & <arcgis-map>?   

I ask because I have done this and have run into some users not being able to get to those outside div(s).  When they try and click on one, the map is the focus, cannot reach the custom div.  It is only a few so far, and unfortunately not any users I personally know so I am having trouble finding what is going on. 

My best guesses are that they have older windows, chrome, or their computers are not webGL compatible.  Or possibly a stacking issue.

Or should I keep them outside the <arcgis-map> but inside the <calcite-shell> perhaps?

Could we possible get a slot="manual" so we can keep them in the map but have more control?  Or am I missing something here?

I isolated my custom div(s) from the shell for now...waiting to see if I get any more phone calls.

    #optionsDiv,
    #toolbarDiv,
    #topRightTools,
    #searchHelpPanel {
      pointer-events: auto;
      isolation: isolate;  /* forces new stacking context */
    }

    /* this does nothing */
    arcgis-map:focus,
    arcgis-map *:focus {
      outline: none !important;
    }

    calcite-shell {
      isolation: isolate;
    }

 

0 Kudos
2 Replies
ReneRubalcava
Esri Frequent Contributor

The equivalent to manual would be the default slot, basically don't name a slot and it goes into the default location.

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

Here's a demo: https://codepen.io/odoe/pen/ZYpWjXQ?editors=1000

0 Kudos
MatthewDriscoll
MVP Alum

Thanks, I was leaning that way.  I was having trouble with some of Esri's sdk limitations or styling fighting me when I put it inside the shell/map.  AI suggested I move non Esri components outside, and it fixed my issues.  I think I figured all that out, honestly is was most likely a problem I created myself.  I will trying moving them back into the shell and map.

Does ESRI recommend to keep everything inside the shell or map? 

0 Kudos