Angular: AgGrid will not update rows when subscribing to Observable

后端 未结 1 430
忘了有多久
忘了有多久 2020-12-22 10:30

I am trying to incorporate rxjs and observables into ag grid. For practice, I am following an official ag grid example: https://www.ag-grid.com/javascript-grid-rxjs/

相关标签:
1条回答
  • 2020-12-22 11:18

    You are expecting data-binding for grid-data, but it doesn't work like that. For updating existing data you need to call

    rowNode.setData(data)
    

    Replaces the data on the rowNode. When complete, the grid will refresh the the entire rendered row if it is showing.

    or

    rowNode.setDataValue(colKey, value)
    

    Replaces the data on the rowNode for the specified column. When complete, the grid will refresh the rendered cell on the required row only.

    Check doc for more details

    *JFI changes through data-binding possible but you would require to make it via node and manipulate with node.data but I'm not recommending using this type of data-update.

    0 讨论(0)
提交回复
热议问题