I have a cell renderer which is a text box.
<input type="text"[(ngModel)]="textVal" class="form-control mb-2 mr-sm-2 mb-sm-0"
id="measurename" (input)="onValChange()">
Whenever i write something in text box i update the data in other rows based on some logic
for (const node of this.selectedRowNodes) {
if (this.parameterDefMap[this.parameterDefName]) {
node.data.parameters[this.gridParams.colDef.field] = this.textVal;
}
}
After that i try to refresh the cells/view to update the data in grid
const cell: GridCell = this.gridParams.api.getFocusedCell();
this.gridParams.api.refreshCells(params);
if (cell) {
this.gridParams.api.setFocusedCell(cell.rowIndex, cell.column);
const col = cell.column.getColDef().field;
}
The grid is getting refreshed successfully, but my issue is after refresh focus looses and when i am trying to set the focus to my cell which has a text field, the focus is not getting set.