Usually, you set your grid up with something to generate your [GridItems]
, often something like:
var items: [GridItem] {
return Array(repeating: .init(.adaptive(minimum: 250), spacing: 10, alignment: .center), count: 1)
}
See that 1
at the end? That's the important bit!
(Technically, it can be other numbers too and still work, but 1 is kinda what the Grid will be looking for, and what you expect the result to look like, when it adaptive.