According to documentation (https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#listItemCr...) using listItemCreatedFunction I can add additional child panels to each layer listItem.
Use this function to add actions and panels to list items, and to override the default settings of a list item
It is working for single panel, How can I add multiple panels activated from different buttons? Something like this:
Code:
listItemCreatedFunction(event: any) {
const item = event.item;
const slider = new Slider(..);
item.panel = {
content: slider,
className: "esri-icon-sliders-horizontal",
title: "Change layer opacity"
}
}
I know I can add multiple elements in panel.content attribute but that is not that I want. I want different buttons that activates different panels. Alternatively thare can be single panel with hidden content depending on clicked button - but still I am not able to add multiple buttons in ListItem.