I want to make the first item from a tree list be selected by default. I am working on extjs 6. Any help will be greatly appreciated.
Try this:
listeners: {
element: 'element',
painted: function (treelistEl) {
var treelist = treelistEl.component;
treelist.setSelection(treelist.getStore().getRoot().firstChild);
}
}