patternfly-bootstrap-treeview icon indicating copy to clipboard operation
patternfly-bootstrap-treeview copied to clipboard

tree don't collapse

Open Climberdav opened this issue 8 years ago • 4 comments

Hie,

I try using your bundle but I can't collapse the tree, even if I put levels:1 in the tree definition. No error fired. The tree is shown but all expanded. The same configuration works fine with jonmiles/bootstrap-treeview.

If I put some logic like nodeSlected it works.

I have jquery 2.2.4 from cdnjs and bootstrap from 3.3.6 from maxcdn.

Here is my tree definition : $('#tree').treeview({ data: {{ tree|raw }}, showTags: true, // color: "#428bca", expandIcon: 'glyphicon glyphicon-chevron-right', collapseIcon: 'glyphicon glyphicon-chevron-down', levels: 1, });

Can you help me ?

Climberdav avatar Jan 26 '17 12:01 Climberdav

i guess you must use patternfly‘s bootstrap-treeview.css patternfly-bootstrap-treeview.css v2.1.0

3xxx avatar Jan 31 '17 01:01 3xxx

@Climberdav could you please post a working fiddle? And also verify if @3xxx's suggestion fixes the issue.

skateman avatar Jul 31 '17 07:07 skateman

@3xxx's answer but on load the complete tree is expanded. i tried to add state to the json but it had no effect. Even calling $('#tree').treeview('collapseAll', { silent: false }); did not collapse it, you always have to click on every item to collapse it.

MaggiWuerze avatar Jun 05 '18 12:06 MaggiWuerze

I switched my library from jonmiles/bootstrap-treeview to this one, and added the css as @3xxx said and it works :+1:

waliddoch avatar Aug 09 '18 08:08 waliddoch