I want to change action icon size when user change density table:
The Pen icon on the right should change size when row is smaller, like this:

For the moment i use onStageChange to capture all change on table and set a state variable on component
...
const [density, setDensity] = useState<GridDensity>();
...
const actionEdit: GridColDef = {
field: '',
type: 'action',
align: 'right',
disableColumnMenu: true,
disableClickEventBubbling: true,
resizable: false,
flex: 1,
headerClassName: 'edit-theme-header',
cellClassName: 'edit-theme-cell',
renderCell: () => <EditAction size={density} onClick={() => alert('click')} />
};
...
<XGrid
.....
onStateChange={(v) => setDensity(v.state.density.value)}
/>
It works but onStateChange is called for all state change (not only density). Is there a better way to do ? :)