Merge pull request 'price change render fixed 2' (#59) from temp/price-change-render-fix-2 into main

Reviewed-on: Pozomind/pozo-retail-app#59
This commit is contained in:
karthikalakshmi 2026-02-03 13:53:26 +05:30
commit c48b3dbf08
1 changed files with 4 additions and 3 deletions

View File

@ -227,11 +227,11 @@ const ProductPriceChange = ({
console.log(cardData, 'noSubcatCardDatanoSubcatCardData', ItemCard);
useEffect(() => {
if (priceChangeModal || productPriceChange) {
const extractStockDtls = (data) => {
if (data?.length === 0 || !data) return [];
let stockDtls = [];git
let stockDtls = [];
data?.forEach((item) => {
let products = item?.ProductDetail?.flatMap((product) => product);
@ -266,7 +266,8 @@ const ProductPriceChange = ({
};
setTableData(extractStockDtls(priceChangeProduct || cardData || []));
setCurrentPage(1);
}, [cardData, priceChangeProduct]);
}
}, [cardData, priceChangeProduct, priceChangeModal, productPriceChange]);
const handleNewMRPChange = (value, index) => {
const updatedTableData = [...tableData];