-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Description
Justified grid doesn't re-render items if their sizes change.
Steps to check or reproduce
I fetch multiple images but the initial grid stays, how do I re-render the grid to dynamically resize every item if they change?
My code:
...
const [images, setImages] = useState<any[]>([])
...
<JustifiedGrid
gap={5}
defaultDirection={"end"}
align={'justify'}
columnRange={[1,4]}
rowRange={0}
sizeRange={[100,500]}
isCroppedSize={false}
displayedRow={-1}
useResizeObserver={true}
observeChildren={true}
autoResize={true}
>
{images.map((x: any, index: number) => (
<div key={index} className='w-full overflow-hidden'>
<Image src={x?.url} alt='' className='' />
</div>
))}
</JustifiedGrid>
Here's the result:
aaaa.mov
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested