print added
This commit is contained in:
@@ -33,9 +33,10 @@ interface BoxesPrintProps {
|
|||||||
weight: number;
|
weight: number;
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
key: number | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BoxesPrint = forwardRef<HTMLDivElement, BoxesPrintProps>(({ boxData }, ref) => {
|
const BoxesPrint = forwardRef<HTMLDivElement, BoxesPrintProps>(({ boxData, key }, ref) => {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
ref={ref}
|
ref={ref}
|
||||||
@@ -51,6 +52,7 @@ const BoxesPrint = forwardRef<HTMLDivElement, BoxesPrintProps>(({ boxData }, ref
|
|||||||
height: '100mm',
|
height: '100mm',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
key={key}
|
||||||
>
|
>
|
||||||
<Box sx={{ border: '1px solid black' }}>
|
<Box sx={{ border: '1px solid black' }}>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
|
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const BoxesPrintList = forwardRef<HTMLDivElement, BoxesPrintListProps>(({ boxDat
|
|||||||
<div ref={ref}>
|
<div ref={ref}>
|
||||||
{productsChunks.map((chunk, index) => (
|
{productsChunks.map((chunk, index) => (
|
||||||
<div key={index} style={{ pageBreakAfter: 'always' }}>
|
<div key={index} style={{ pageBreakAfter: 'always' }}>
|
||||||
<BoxesPrint boxData={{ ...boxData, products_list: chunk }} />
|
<BoxesPrint boxData={{ ...boxData, products_list: chunk }} key={index} />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user