Widget "Legend" : Do not display "no legend" by default

744
2
Jump to solution
08-12-2019 04:00 AM
LaurentDedry
New Contributor

I am working with the Web App Builder 2.10. I customized the legend widget html to display some fixed items (widgets\Legend\Widget.html). I also want to display a dynamic legend. However, by default when no layers are selected, the second part of the widget (the dynamic legend) displays "Pas de légende". How can I remove this ?

0 Kudos
1 Solution

Accepted Solutions
LaurentDedry
New Contributor

I tried this piece of code but it didn't work. However this code works (WebAppBuilder 2.10):

div.esriLegendMsg {
display: none;
}

View solution in original post

0 Kudos
2 Replies
Egge-Jan_Pollé
MVP Regular Contributor

Hi Laurent Dedry,

Did you see this thread: Layerlist with a Legend sample ?

The solution there was to suppress the message using CSS:

div.esri-legend__message {
    display: none;
 }‍‍‍

HTH,

Egge-Jan

0 Kudos
LaurentDedry
New Contributor

I tried this piece of code but it didn't work. However this code works (WebAppBuilder 2.10):

div.esriLegendMsg {
display: none;
}
0 Kudos