11
Views
8
Comments
Solved
[zTree] Hide icon + and - by zTree
Forge component by Eduardo Luís
20
Published on 03 Oct 2019

Hi!

I am using the ZTree component and I have a situation that I cannot progress.

How do I hide the "+" and "-" icon from the tree?


Rank: #72
Solution

Hi Danilo, 

The (+) button appears according to the IsParent property, so for it doesn't appear when you don't hear children, just set IsParent to false when assembling the list (for nodes that don't have children).

Hi Danilo,

I'm not sure if you can get rid of the "+" and "-" within the widget or configuration.

But you can hidden them with CSS:

.ztree .button.roots_open,
.ztree .button.roots_close,
.ztree .button.center_open,
.ztree .button.center_close,
.ztree .button.bottom_open,
.ztree .button.bottom_close{
    display: none;
}

Best Regards,

Cláudio Rodrigues


mvp_badge
MVP
Rank: #19

Hi Danilo,

If you add the forge component to your original post's data (Edit and then use the "+ Forge Component" button), that will make it easier for the team that developed it to notice your question and address it.

Cheers! 

Rank: #72
Solution

Hi Danilo, 

The (+) button appears according to the IsParent property, so for it doesn't appear when you don't hear children, just set IsParent to false when assembling the list (for nodes that don't have children).