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);
} else {
onChange([]);
}
}, [rowSelection]);
useEffect(() => {
setRowSelection({});
}, [locationId]);
if (
selectedKandangs.length === 0 &&
Object.keys(rowSelection).length !== 0
) {
setRowSelection({});
}
}, [selectedKandangs]);
// track sorting
useEffect(() => {