Hi,
I'm trying to use update a row on a virtualized TreeGrid but when I do, the row data displayed in the TreeGrid doesn't change.
I pass the row data from the model to a component and edit it directly, but this has no effect.
I have then tried using updateRow to push the change back to the grid, but this also has no effect.
For example, I'm capturing the changed status of a checkbox in the row and effecting a change to the column field value.
The row data object is updated correctly, but when I pass it to updateRow the column field value doesn't change.
I'm testing using a simple append to the field value, original value "ABCDE" becomes "ABCDE CHECKED". The value stays as "ABCDE" even after updateRow.
captureChange(event) {
this.data.text = this.data.text + " CHECKED";
this.$parent.$parent.$refs.grid.updateRow(this.data.index, this.data)
}
this.$parent.$parent.$refs.grid returns the correct TreeGrid element from the grandparent. The index is also correct, I have used filter to check the index and the data are the same from the grid. (e.g. this.$parent.$parent.$refs.grid.getCurrentViewRecords().filter((item) => item['value'] == this.data.value)[0])
I've even tried getting the record from the grid, modifying that and pushing it back with updateRow, with no effect, e.g.
captureChange(event) {
let gridRow = this.$parent.$parent.$refs.grid.getCurrentViewRecords().filter((item) => item['value'] == this.data.value)[0];
gridRow.text = gridRow.text + " CHECKED";
this.$parent.$parent.$refs.grid.updateRow(gridRow.index, gridRow);
}
Is this a limitation of virtualization or is there something I'm missing?
Thanks in advance,
Nathan