问题
does anyone know a way to find out, in ExtJS if a selected item in an Ext.tree.Panel
has a child? I know you can find a selected item by doing tree_dir.getSelectionModel().getSelection()
but I don't see any way to check if it has any children.
回答1:
The instance returned by tree_dir.getSelectionModel().getSelection()
should have hasChildNodes()
method specifically for that purpose.
来源:https://stackoverflow.com/questions/13608736/find-out-if-a-selected-item-in-extjs-ina-ext-panel-tree-has-a-child