select all + mobile table in all pages

This commit is contained in:
hamid zarghami
2025-07-29 09:37:22 +03:30
parent 8b28a2dee0
commit ab1b509c42
9 changed files with 642 additions and 27 deletions
+3 -1
View File
@@ -58,10 +58,12 @@ const Table = <T extends RowDataType>({
};
}, []);
// خروج از حالت انتخاب اگر هیچ آیتمی انتخاب نشده
// خروج از حالت انتخاب اگر هیچ آیتمی انتخاب نشده، ورود اگر آیتمی انتخاب شده
React.useEffect(() => {
if (selectedRows.length === 0 && mobileSelectionMode) {
setMobileSelectionMode(false);
} else if (selectedRows.length > 0 && !mobileSelectionMode) {
setMobileSelectionMode(true);
}
}, [selectedRows.length, mobileSelectionMode]);