我有一个extjs树面板(Ext.tree.Panel)。我想使用向上和向下箭头来浏览项目并触发项目点击事件。
让我知道如何做到这一点。
谢谢,
答案 0 :(得分:0)
您需要为此使用不同的事件调用(afteritemcollapse和afteritemexpand)。请参考下面的
afteritemcollapse( node, index, item, eOpts )
Fires after an item has been visually collapsed and is no longer visible in the tree. ...
Fires after an item has been visually collapsed and is no longer visible in the tree.
Available since: 4.1.0
Parameters
•node : Ext.data.NodeInterface
The node that was collapsed
•index : Number
The index of the node
•item : HTMLElement
The HTML element for the node that was collapsed
•eOpts : Object
The options object passed to Ext.util.Observable.addListener.
和扩展:
afteritemexpand( node, index, item, eOpts )
Fires after an item has been visually expanded and is visible in the tree. ...
Fires after an item has been visually expanded and is visible in the tree.
Available since: 4.1.0
Parameters
•node : Ext.data.NodeInterface
The node that was expanded
•index : Number
The index of the node
•item : HTMLElement
The HTML element for the node that was expanded
•eOpts : Object
The options object passed to Ext.util.Observable.addListener.
我希望这会对你有所帮助。 感谢