I am trying to create an ExtJS 6.5.1 NestedList with a custom NestedListItem component. I can't find a working example on internet or in the ExtJS documentation.
Would anyone be able to show me a working example of a List or NestedList with a custom component item?
You will need to use listConfig along with itemTpl to get custom XTemplate style in NestedList.
NestedList documentation says:
But I found it does not work in ExtJS 6.x. It ends up throwing error as can not override getItemTextTpl.
Here is a working example with listConfig and itemTpl:
Example Fiddle: https://fiddle.sencha.com/#view/editor&fiddle/29t3
EDIT:
Example Using Component instead of itemTpl:
Example Fiddle with Component: https://fiddle.sencha.com/#view/editor&fiddle/29u0
For mapping data in listItem you can use https://docs.sencha.com/extjs/6.2.0/modern/Ext.dataview.ListItem.html#cfg-dataMap
Here is example on using ListItem with dataMap: https://www.sencha.com/forum/showthread.php?183774-dataMap-to-DataItem-s-items