I have a List in a sidebar style which contains a LazyVGrid and a Section with a simple list contents. Every thing works well except when content increases and layout changes (from two columns to one column) for the LazyVGrid with editMode changing to .active ... LazyVGrid does not expand/resize when the content increases (the increased content gets clipped)...but does when user expands/folds on the section below :(. However LazyVGrid resizes to show the entire content when the content shrinks with editMode reverting to .inactive
Note:
Any pointers to solve the LazyVGrid (embedded in a List) not resizing or expanding when content increases ... will be deeply appreciated.
Note:
If I replace the List with a ScrollView...lazyVGrid resizes perfectly when content increases in editMode = .active....but then I would lose all the Sidebar and List characteristics for the Section below :(
Also, looks like .onMove is not supported in LazyVGrids
Any pointers to solve the LazyVGrid (embedded in a List) not resizing or expanding when content increases ... will be deeply appreciated.
Code Block swift var body: some View { List { LazyVGrid(columns: editMode?.wrappedValue == .active ? singleColumn : twoColumns, alignment: .leading, spacing: 10) { ForEach(editMode?.wrappedValue == .active ? allDashItems : selectedDashItems) { dashitem in DashItemCell(dashitem) } .onMove(perform: moveDashItem) .environment(\.editMode, editMode) } Section(header: Text("Bottom Section")) { ForEach (sectionList) { item in ListItemCell(item) } .onDelete(perform: deleteFolder) .onMove(perform: moveFolder) } } .listStyle(SidebarListStyle()) }