in MUI paid version there is a checkboxSelectionVisibleOnly
prop. How to achieve the same with the community/free version?
I did something similar, but it shows that the lines on the page were selected, but in the console it shows that all of them were selected
enter image description here
const handleCurrentSelectRow = (newSelectionModel: GridRowSelectionModel) => {
const offSet = paginationModel.page * paginationModel.pageSize;
const currentPageRows = dataPendentes?.slice(
offSet,
offSet + paginationModel.pageSize,
);
setRowSelectionModel(
newSelectionModel.filter(
id => currentPageRows!.findIndex(row => row.rescisaoPK.id === id) > -1,
),
);
};
onRowSelectionModelChange={newRowSelectionModel => {
handleCurrentSelectRow(newRowSelectionModel);
}}
it selects the lines on the current page, but in the console it appears that they are all selected, for example: there are 50 lines and on the first page there are 5, it selects the 5 but in the console it shows 50 lines selected