Using the Angular directive of handsontable 0.26.x in my project first time, I have the following table:
The table is showing some items, which are in scope as $scope.plants
, and has three fix columns. The third column is a bit special though, because I have a special renderer there, to which I want to pass the the entire data row object (plant).
<hot-table datarows="plants" settings="hotTableSettings">
<hot-column data="name" title="Name"></hot-column>
<hot-column data="power" title="Power"></hot-column>
<hot-column data="???" title="AdditionalInfo" renderer="measurementRenderer"></hot-column>
</hot-table>
The problem or question that I have now is: for the third column I have my own custom renderer (measurementRenderer), which needs multiple information from a plant
. So I need to pass the entire plant object that the hot-table is currently iterating through, and not just one attribute of it, as the data of the hot-column
. It's because the rendering logic of my custom renderer is based on multiple attributes of my plant
item, not just one.
In my code above, you can see where I put data="???"
. How can I reference to the plant object which is part of the list of <hot-table datarows="plants"...
?
<hot-table>
does not offer something like <hot-table datarows="plan in plants"
and also nothing like <hot-column data='this'
or <hot-column data='self'
or <hot-column data=''
, as far as I can see. What would be the best approach here?