- This topic has 1 reply, 2 voices, and was last updated 3 years, 7 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › List Menu › List Menu Load ON Demand?
Tagged: list menu component
hi, is it possible to load on demand data inside listMenu like in smart.tree?
For tree i did this that works just fine:
tree.dataSource = data1;
tree.addEventListener(“expand”, function (event) {
let result = data2;
for (let d = 0; d < result.length; d++) {
let newItem = document.createElement(‘smart-tree-items-group’);
newItem.label = result[d].label;
newItem.value = result[d].id;
tree.addTo(newItem, event.detail.item);
}
});
I tried this with list MEnu:
listMenu.dataSource = data1;
listMenu.addEventListener(“expand”, function (event) {
let result = data2;
for (let d = 0; d < result.length; d++) {
let newItem = document.createElement(‘smart-list-items-group’);
newItem.label = result[d].label;
newItem.value = result[d].id;
listMenu.addItem(newItem,event.detail.path);
});
but it wont load the items-group inside the selected parent item.
TY
Hi Dark Beccio,
The ListMenu by design is much simpler component and it does not have the capabilities of the Tree. Load on demand for that component is not supported.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/