I made a small workaround by extending the Ext.DataView. I added the following lines of code after line 135 (version 2.0b1):
Seems to work quite okay!Code:prepareData:function(recordData, ri, record) { for (var i = 0; i < colModel.length; i++) { var col = colModel[i]; if(typeof col.renderer == 'function') { recordData[col.mapping] = col.renderer.apply(this, [recordData[col.mapping]]); } } return recordData; }
This seems to work better! 8)
Code:prepareData:function(recordData, ri, record) { if(recordData.rendered) return recordData; for (var i = 0; i < colModel.length; i++) { var col = colModel[i]; if(typeof col.renderer == 'function') { recordData[col.mapping] = col.renderer.apply(this, [recordData[col.mapping]]); } } recordData.rendered = true; return recordData; }
Is there a way to "scrollTo" to a specific table row?
Mitchell Simoens @LikelyMitch
Modus Create, Senior Frontend Engineer
________________
Need any sort of Ext JS help? Modus Create is here to help!
Check out my GitHub:
https://github.com/mitchellsimoens
Hi Mitch!
The renderer function seems to break when you apply sorting on the columns. Each time the user clicks on the columns to perform a sort, the cell is rendered.
For example, my price column becomes $$$$1 after sorting a few times.
The same seems to happen on your demo, but it's not so visible. After sorting a few times, the "Change" column values get some additional code:
<span style="color: #FF0000;"><span style="color: #FF0000;"> ... </span></span>
Cheers!