Is there a way to have an instance of Ext.dataview.NestedList call a render method per row in the displayed list?
The problem is that you could end up with complicated view logic implemented as HTML-escaped code inside XTemplate string values that are eval'ed at runtime. There's no easy way to write a unit test or to pass the code through a linter.
With Ext.List, you can configure its itemTpl with an XTemplate that calls a method for each row. You have to jump through some hoops to set it up if you want a reference to the render method, but it works: http://ift.tt/RWPKc6
With Ext.NestedList, you can do something similar (listConfig: {itemTextTpl: ...}), but it doesn't work at the root level or on some child levels: http://ift.tt/1oUSQZb
Aucun commentaire:
Enregistrer un commentaire