price change render fixed 2
This commit is contained in:
parent
1a67e75151
commit
6f5710a3fc
|
|
@ -227,11 +227,11 @@ const ProductPriceChange = ({
|
||||||
console.log(cardData, 'noSubcatCardDatanoSubcatCardData', ItemCard);
|
console.log(cardData, 'noSubcatCardDatanoSubcatCardData', ItemCard);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (priceChangeModal || productPriceChange) {
|
||||||
const extractStockDtls = (data) => {
|
const extractStockDtls = (data) => {
|
||||||
if (data?.length === 0 || !data) return [];
|
if (data?.length === 0 || !data) return [];
|
||||||
|
|
||||||
let stockDtls = [];git
|
let stockDtls = [];
|
||||||
|
|
||||||
data?.forEach((item) => {
|
data?.forEach((item) => {
|
||||||
let products = item?.ProductDetail?.flatMap((product) => product);
|
let products = item?.ProductDetail?.flatMap((product) => product);
|
||||||
|
|
@ -266,7 +266,8 @@ const ProductPriceChange = ({
|
||||||
};
|
};
|
||||||
setTableData(extractStockDtls(priceChangeProduct || cardData || []));
|
setTableData(extractStockDtls(priceChangeProduct || cardData || []));
|
||||||
setCurrentPage(1);
|
setCurrentPage(1);
|
||||||
}, [cardData, priceChangeProduct]);
|
}
|
||||||
|
}, [cardData, priceChangeProduct, priceChangeModal, productPriceChange]);
|
||||||
|
|
||||||
const handleNewMRPChange = (value, index) => {
|
const handleNewMRPChange = (value, index) => {
|
||||||
const updatedTableData = [...tableData];
|
const updatedTableData = [...tableData];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue