I have a treelist working using ExtJS6 but since items are left padded automatically given their depth and text inside it gets truncated for third child and deeper. Since I use it as a menu, having fixed width. I need to remove auto calculated leftpad margin. I did not find anything useful while going through extjs api for treelist. Could anyone please help
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If you look at the code of treelist
and treelistitem
and abstract tree list item for a minute, you see that you can use the undocumented config property indent:0
or the method setIndent(0)
.
Not sure why it's not documented, presumably they intend to change the naming in future versions.
I have tested that it's working by opening the dashboard example, expanding the "pages" subtree, and then putting the following line into browser console:
Ext.ComponentQuery.query("treelist")[0].setIndent(0);