I have the following problem:
>>>>>>> Link to a JsFiddle demonstration >>>>>>
I have used the collapse example, and added getItemMetadata method.
dataView.getItemMetadata = function (row) {
var thtId = data[row].id;
if (data[thtId + 1] && data[thtId + 1].indent > data[thtId].indent) {
return { 'cssClasses': 'parentClassName' }
}
};
This works fine until I try to collapse and expanding my rows. Than I get the following error (only on expanding):
Uncaught TypeError: Cannot read property 'id' of undefined
From my experience, this error accrue when the dataView looses the children's properties. I investigated more and saw that the code fall in the appendRowHtml function (slick.grid.js#1217).
Does anyone has expirience with collapsing feature & getItemMetadata?
Thank You!