My goal is to add a custom radio button to allow the user to select a row. At the moment I have
const Cell = (cellProps) => {
const { data, node, api } = cellProps
const selectedRow = () => {
let { isChecked } = data
let radioButtonLabel = ''
const newRowData =[]
api.forEachNode((currNode) => {
const currRowData = currNode.data
if (id === currNode.data.id) {
currRowData.isChecked = true
radioButtonLabel = currNode.data.name
}
newRowData.push(currRowData)
})
api.setRowData(newRowData)
}}
So the problem is that when the user selects a radio button of a row on the bottom of my table, it refreshes the grid (I believe setRowData triggers a refresh) and the user has to scroll to the bottom of the table to see their selection. I want to be able to stop the refresh when the user selects the radio button but not sure how that can be implemented with AG-Grid.