0

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

ducktyped
  • 4,354
  • 4
  • 26
  • 38

1 Answers1

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);
Alexander
  • 19,906
  • 19
  • 75
  • 162
  • I tried using `indent` property on both `treelist` and `treelistitem`, none worked – ducktyped Jul 07 '16 at 14:26
  • @ducktyped Not sure what you did exactly, but I have updated the post with the reproducible results of my successful quick test. – Alexander Jul 07 '16 at 14:33