patternfly / patternfly-bootstrap-treeview

Tree View for Twitter Bootstrap -
http://jonmiles.github.io/bootstrap-treeview
Apache License 2.0
200 stars 105 forks source link

use of Fontawesome not possible #73

Closed MaggiWuerze closed 6 years ago

MaggiWuerze commented 6 years ago

if you have fontawesome included in your page and create nodes with fontawesome classes instead of glyphicons (removed in later Bootstrap versions) it either displays nothing, squares or ignores the classes entirely and creates the nodes with standard glyphicon classes instead.

skateman commented 6 years ago

@MaggiWuerze can you please provide a working reproducer on codepen or jsfiddle? Thanks

MaggiWuerze commented 6 years ago

can do, but i just tried to do it via the $('#tree').treeview() method instead of node json data and the classes are accepted from there. only the icons for collapse and expand are not switching, it always shows the expand icon.

my treeview():


 $('#tree').treeview({
    dataUrl: {url: "getNodes.json"},
    levels: 4,  
    showBorder: false,  
    backColor: "#7386D5",  
    onhoverColor: "#445387",  
    selectedColor: "#F5F5F5",  
    expandIcon: "fas fa-caret-down",  
    showIcon: false,  
    collapseIcon: "fas fa-caret-up"  
                });
skateman commented 6 years ago

fas fa-caret-down -> fa fa-caret-down