JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Menu & Tree How to hide a drop down arraw when there is no children for an item?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #111087
    Aditya Prakash
    Participant

    By default when we use <TreeItemsGroup> it showing dropdown icon but if there is no child so Is there any way to handle to remove an icon from treeitemsgroup.

    #111088
    Markov
    Keymaster

    Hi Aditya,

    In this case, I suggest you to add a smart-tree-item instead. When you add children to it, it will automatically become a smart-tree-items-group.

    Best regards,
    Markov

    Smart UI Team
    https://www.htmlelements.com/

    #111089
    Aditya Prakash
    Participant

    can we use allowdrag and allowdrop with smart-tree-item?

    #111090
    Aditya Prakash
    Participant

    I am using Reactjs and want to show dropdown icon when we drop a child into it.

    #111098
    Markov
    Keymaster

    Hi Aditya,

    If it is a tree item, you can drop above or below.

    Best regards,
    Markov

    Smart UI Team
    https://www.htmlelements.com/

    #111099
    Aditya Prakash
    Participant

    but it will not act as a child.

    #111102
    Markov
    Keymaster

    Hi Aditya,

    Yes, it will not. A possible solution here would be to use smart-tree-items-group. After you create the tree, use document.querySelectorAll(‘smart-tree-items-group’) and then loop through all groups, check the .children property for children and hide the arrow if there’s no child.

    Best regards,
    Markov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.