Opened 10 years ago
Closed 10 years ago
#11896 closed defect (invalid)
dijit.Tree getIconClass - icons not refreshed/displaying
Reported by: | mdesmond | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.5 |
Keywords: | dijit, tree, getIconClass | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
I have a dijit.Tree and I have overridden the getIconClass function to return a custom icon class.
1). When the tree initially appears my custom icon is not displayed at all.
2). When the tree is collapsed/expanded the icon is applied to the root node but never to the leaf nodes.
I'm using an ItemFileReadStore and a ForestStoreModel. Code is attached.
Thanks Mike
Attachments (3)
Change History (4)
Changed 10 years ago by
Attachment: | index.html added |
---|
Changed 10 years ago by
Attachment: | treebug.zip added |
---|
Changed 10 years ago by
Attachment: | diagram_16x16.png added |
---|
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → invalid |
Status: | new → closed |
You are setting the value of getIconClass too late, after the Tree has already called the original getIconClass(). Something like this will work:
var tree = new dijit.Tree({ model: treeModel, showRoot: true, getIconClass: myGetIconClassFunction }, "treeOne");
Note: See
TracTickets for help on using
tickets.
unzip and open index.html