question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

InifiniteScroll component wrapping material UI Grid

See original GitHub issue

When i using a grid component inside InfiniteScroll component, its only show one item per row, even though i want to show 5 item per row, it doesnt work.

 <InfiniteScroll>
   {userFeed.map(item => (
      <Grid>
      </Grid>
   ))}
</InfiniteScroll>

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
brunoqscommented, Jun 29, 2020

to make this work with material ui i need to wrap all Grids components with the InfiniteScroll component, like that :

 <InfiniteScroll>
   <Grid container>
      {userFeed.map(item => (
         <Grid>
         </Grid>
      ))}
   </Grid>
</InfiniteScroll>
1reaction
samuel-knutsoncommented, Jun 28, 2020

I had the same issue with the Grid component from semantic-ui-react. I was able to get it working by setting the semantic-ui class names directly instead of using semantic-ui-react. Specifically, I (1) set className="ui grid" on the InfiniteScroll component and (2) set className="two wide column" on the item itself. I have not used material UI, but perhaps you can do something similar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

InifiniteScroll component wrapping material UI Grid · Issue #252
When i using a grid component inside InfiniteScroll component, its only show one item per row, even though i want to show 5...
Read more >
Infinite Scrolling not working with Material UI Grid component
I have Grid from Material UI as a child of InfiniteScroll and I am wondering if they work together well or not? Here...
Read more >
React Grid component - Material UI - MUI
In order to create a grid layout, you need a container. Use the container prop to create a grid container that wraps the...
Read more >
Implementing Infinite Scroll And Image Lazy Loading In React
We have successfully implemented fetch, infinite scroll, and image lazy loading. We might have another component in our application that needs ...
Read more >
Bootstrap 5 grid system - examples and tutorial
MDB 5 - Bootstrap 5 & Material Design Grid System Tutorial ... Bootstrap requires a containing element to wrap site contents and house...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found