HTML Elements Forums Navigation List Menu List Menu Load ON Demand?

This topic contains 1 reply, has 2 voices, and was last updated by Avatar admin 1 month, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #101772
    Avatar
    Dark Beccio
    Participant

    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

     

    #101773
    Avatar
    admin
    Keymaster

    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/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.