chore(FE-188,193): adjust ExpenseKandangsTable component

This commit is contained in:
ValdiANS
2025-11-17 14:05:24 +07:00
parent fc76b44279
commit 83f1ba46a7
@@ -145,12 +145,19 @@ const ExpenseKandangsTable = ({
); );
onChange(formattedSelectedKandangs); onChange(formattedSelectedKandangs);
} else {
onChange([]);
} }
}, [rowSelection]); }, [rowSelection]);
useEffect(() => { useEffect(() => {
if (
selectedKandangs.length === 0 &&
Object.keys(rowSelection).length !== 0
) {
setRowSelection({}); setRowSelection({});
}, [locationId]); }
}, [selectedKandangs]);
// track sorting // track sorting
useEffect(() => { useEffect(() => {