In after selction ends I am trying to apply class but it is not applying can you please let me know what is stoppping class not to apply.
I tried on intial load by applying the class it applying. so the css import is working but class is not applying here in aftyer selection ends
I saw in dom myRow class is getting applied and remioving it immediately I want to know the reason why it is removing
Below is my afterselectionends
onAfterSelectionEnds: React.useCallback(
(row, column, row2) => {
const hotInstance = hotRef?.current?.hotInstance;
if (row === -1 || !hotInstance) {
return;
}
const hotTableData = hotInstance?.getData() || [];
const data = hotTableData?.slice(row, (row2 || 0) + 1);
data[0]?.forEach((rowValue, i) => {
hotInstance.setCellMeta(row, i, 'className', 'myRow');
});
hotInstance.render();
const colHeader = hotInstance?.getColHeader();
const colIndex = colHeader?.findIndex((column) => column === 'Entity Id');
const selectedRowIds = data?.map((d) => String(d[colIndex]));
batch(() => {
dispatch(drillingChartActions.setClickOnGrid(true));
dispatch(drillingChartActions.setSelectedRows(selectedRowIds));
dispatch(drillingChartActions.setCurrentClickedRowId(selectedRowIds[0]));
dispatch(actions.setShouldNotAutoScrollOnly({ groupId: null, value: false }));
combinedDispatch({
isSyncOn,
action: actions.setSelectedRows(selectedRowIds),
ignoreSelf,
});
combinedDispatch({
isSyncOn,
action: actions.setShouldNotAutoScrollOnly({ groupId: null, value: false }),
ignoreSelf,
});
combinedDispatch({
isSyncOn,
action: actions.setClickOnGrid(true),
ignoreSelf,
});
combinedDispatch({
isSyncOn,
action: actions.setCurrentClickedRowId(selectedRowIds?.[0]),
ignoreSelf,
});
});
},
[hotRef, tableData, dispatch],
),