-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behaviour after WrappingStack out of screen #6
Comments
Thanks for sharing this issue. I'll check what happens here in the next couple of days |
any potential update? Thanks |
@skywalkerlw it seems that there could be lots of the rows here and you are using |
Here is the code that reproduces the issue: import SwiftUI
import WrappingStack
private struct Item {
var title: String
var subtitle: String
var content: [String]
}
struct ContentView: View {
private let items = (0 ..< 100).map { index in
Item(
title: "\(index): \(Int.random(in: 100_000 ... 200_000))",
subtitle: String(Int.random(in: 100_000 ... 200_000)),
content: (0 ..< Int.random(in: 2 ..< 10)).map { _ in
String(Int.random(in: 100_000 ... 200_000))
}
)
}
var body: some View {
List(Array(items.enumerated()), id: \.offset) { i in
VStack {
Text(i.element.title).font(.headline)
Text(i.element.subtitle).font(.body)
WrappingHStack(id: \.self) {
ForEach(i.element.content, id: \.self) {
Text($0)
.padding()
.background(Color.gray.opacity(0.5))
}
}
}
.padding()
.cornerRadius(8)
.background(Color.white)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
} |
I'm using ScrollView + LazyVStack, and yes, it comes lots of list items |
See attached video.
Kapture.2021-08-02.at.12.50.34.mp4
By the way, I'm using the latest version on iOS 14 (Xcode 12.5)
The text was updated successfully, but these errors were encountered: