Closed trevordevs closed 1 year ago
Unrelated to this amazing package, thank god.
I have the same issue, when I append new items into the array of the scrollView inside the Page, it scrolls to the top. Seems like the whole page refreshes again.
Page { state in
crushBacksPageHeaderView(state)
} content: {
List {
ForEach(viewModel.crushBacks) { crushBack in
let crushBackCellViewModel = CrushBackCellViewModel(matchButtonPressed: onMatchButtonPressed(_:), notInterestedButtonPressed: crushBackNotInterestedButtonPressed(_:), viewDetailButtonPressed: onShowingCrushBackDetailView(_:))
CrushBackCell(crushBackModel: crushBack, viewModel: crushBackCellViewModel)
.cornerRadius(15)
.background {
RoundedRectangle(cornerRadius: 15)
.stroke(Color.gray.opacity(0.5), lineWidth: 1)
}
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
}
Button(action: loadMore) {
Text("Load more")
.multilineTextAlignment(.center)
}
}
.padding(.top, -12)
.refreshable {
Utility.delay(1) {
viewModel.crushBacks = CrushBackModel.mockData()
}
}
}
}
.indicatorColor(.main)
I have a scrollview-lazyvstack inside of the page view, when you scroll up, the scrollview glitches repeatedly at the top. Any idea on what could be causing this? https://user-images.githubusercontent.com/85640211/211188368-bd922c34-bbd3-45fa-b296-707b0c09cdd3.mov