this.hotTableComponent.current.hotInstance.getCell(row, col).parentNode.children[0].classList[1] === ‘ht_nestingParent’
i use this to check if a row is parent in nestedRow but it work with fakeData, when i get data from api, getCell return null and then, i got error. is there another solution for this problem?
getCell is null when call data from API
Hi @doanak000
we do not have an official API for retrieving information about the parent-row indexes. I think that the most reliable way to read if a row is a parent or a child is to check the TH.className
of the elements via afterGetRowHeader()
hook.
can you give me a example?
Here it is https://jsfiddle.net/d20r8y93/2/
ps. please remember that in the pre-sales support we do not create custom demos so if you would like to receive a custom demo I will need to confirm your support plan (preferably via support@handsontable.com)