Issue 472: Need mechanism to "hide" a node
Status:  WontFix
Owner: ----
Closed:  Jan 2014
Reported by graffle...@gmail.com, Jan 21, 2014
I would like to hide a node.  I've tried adding a class to the node (if it is hidden) with css:  'visibility: hidden'   and setting hideCheckbox=true

but then I get the display as shown in the attached image 'current.png' where I try to hide nodes "layerC" and "layerD"

I would like to get the display shown in the attached image 'desired.png' where the hidden nodes are collapsed completely.

current.png
112 KB   View   Download
desired.png
84.7 KB   View   Download
Jan 21, 2014
#1 graffle...@gmail.com
My solution: 

I added a new node attribute 'hidden'

$.ui.dynatree.nodedatadefaults = {
    ....
    hidden: false, // is node hidden

then added a line #475
    this.li.style.display = ( data.hidden ? "none" : "visible" )


this got me to the image shown in 'desired.png'
Jan 21, 2014
Project Member #2 moo...@wwwendt.de
> I've tried adding a class to the node (if it is hidden) with css:  'visibility: hidden'  

have you tried to use CSS 'display: none' instead?
Status: Waiting
Labels: Milestone-Release1.2.6
Jan 22, 2014
#3 graffle...@gmail.com
WRT idea to add 'display: none' instead... great idea... I just tried that.

It doesn't work because the display style is overridden by the dynatree-node style which sets display: inline-block

The other problem is that the display:none should be on the <LI> not on the <span>

see attached file "suggestionFailed.png"
suggestionFailed.png
216 KB   View   Download
Jan 25, 2014
Project Member #4 moo...@wwwendt.de
That would be a new feature, so it's rather a topic for the successor 'Fancytree'.
Have a look at the 'filter' extension there.
Status: WontFix