El Guapo
El Guapo

Reputation: 5781

Dojo tree selected node

Upon creating a tree from a store in dojo, it seems to pre-select the top node in my tree; does anyone know how to stop this from happening?

Upvotes: 0

Views: 2111

Answers (2)

Shivank Arya
Shivank Arya

Reputation: 26

Try this:

this.mytree.lastFocused.setSelected(false);

Upvotes: 1

Bill Keese
Bill Keese

Reputation: 1931

There's no official way to prevent pre-selection, although if you don't want to show any selection ever, then just write a CSS rule to suppress that style:

.dijitTreeNodeSelected { background: none !important; }

or something like that.

Upvotes: 1

Related Questions