I am using n2-handsontable with angular 4 for a project. I can't seem figure out how to refresh the table when the data has changed. I found this post:
It seems to be what I want but I can't figure out how to access the handsontable object. My initial thought was to use # for binding but it isn't working as intended, it just passing 'undefined' to the function.
component.html
<button class="btn btn-default" (click)="add(hot)">Add</button>
<hotTable [data]="_dataHot"
[colHeaders]="_columnHeadersHot"
[columns]="_columnsHot"
[options]="{contextMenu: true}"
#hot>
</hotTable>
component.ts
add(hot){
//do stuff
hot.render();
}
edit: I could force a render by doing ngIf tricks but that doesn't seem like a good solution.
