paololeonardi / WaterfallGrid

A waterfall grid layout view for SwiftUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use multiple grid at the same screen

phuongphally opened this issue · comments

              Group {
                       WaterfallGrid(viewModel.categories) { category in
                          CategoryItem(category: category)
                       }
                       .gridStyle(columns: 3)
                    
                      WaterfallGrid(viewModel.products) { product in
                           ProductCell(product: product)
                      }
                      .gridStyle(columns: 2)
                   }

When I use 2 difference grid in same page , Layout will have two difference scroll.

What I need is only one scroll per screen.

thanks

Hi yes, you are creating two different grids and each of them has its own scroll view.

You probably want a grid that supports sections but I'm afraid WatefallGrid doesn't have this feature yet.