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