masonic icon indicating copy to clipboard operation
masonic copied to clipboard

How can i use Masonic inside position: fixed container ?

Open ptimer opened this issue 3 years ago • 4 comments

For example this piece of code doesn't render elements

.positionFixedWrapper {
    width: 100%;
    min-height: 100vh;
    height: 100%;
    position: fixed;
    overflow-y: auto;
}

<div className={styles.positionFixedWrapper}>
   <GridListComponent>
      <Masonry items={items} columnGutter={10} render={MasonryCard} />
   </GridListComponent>
</div>

example - https://codesandbox.io/s/cool-lake-1ppj5?file=/src/App.js

ptimer avatar Nov 18 '21 11:11 ptimer

https://codesandbox.io/s/masonic-inside-of-a-scrollable-div-example-k9l6c?file=/src/index.js

jaredLunde avatar Nov 18 '21 14:11 jaredLunde

@jaredLunde thank you very much i've spent the whole day for this :))))

ptimer avatar Nov 18 '21 14:11 ptimer

No worries, sorry about that! Should have made the documentation more clear.

jaredLunde avatar Nov 18 '21 14:11 jaredLunde

hello mate

thanks for this amazing component

looks like the useMasonry hook is not working correctly without images inside a scroll container div

https://codesandbox.io/s/masonic-inside-of-a-scrollable-div-example-forked-5cypjl

i works on the first load, but if you make any change in the code, you will see this result

https://snipboard.io/2xal3d.jpg

franmastromarino avatar Feb 27 '22 13:02 franmastromarino