Biome: fixes for app/dashboard/search_pace_id pages

This commit is contained in:
Utkarsh-Patel-13 2025-07-27 11:46:34 -07:00
parent 07063a1a18
commit ecc4c11100
22 changed files with 472 additions and 480 deletions

View file

@ -229,14 +229,14 @@ export function DocumentsDataTable({
if (hasChanges && Object.keys(initialRowSelection).length > 0) {
setRowSelection(initialRowSelection);
}
}, [initialRowSelection, rowSelection]);
}, [initialRowSelection]);
// Initialize row selection on mount
useEffect(() => {
if (Object.keys(rowSelection).length === 0 && Object.keys(initialRowSelection).length > 0) {
setRowSelection(initialRowSelection);
}
}, [initialRowSelection, rowSelection]);
}, []);
const filteredDocuments = useMemo(() => {
if (documentTypeFilter === "ALL") return documents;
@ -263,7 +263,7 @@ export function DocumentsDataTable({
const selectedRows = table.getFilteredSelectedRowModel().rows;
const selectedDocuments = selectedRows.map((row) => row.original);
onSelectionChange(selectedDocuments);
}, [onSelectionChange, table]);
}, [rowSelection, onSelectionChange, table]);
const handleClearAll = () => setRowSelection({});