Open mobileuidev opened 1 year ago
@mobileuidev might be something to do with how the size of text is calculated when it appears on screen in a LazyVStack
, I'll add a note to my article mentioning that.
I'll let you know if I come up with a different solution, in the meantime you might need to set the initial height on the view, like in the example from Expandable-text-with-constrained-height.swift
.
@nataliapanferova someone on SO added an answer to my question, I guess it's an acceptable solution for this issue.
When I try to use
viewThatFits
as described in theExpandable-text-with-line-limit.swift
example but with aLazyVStack
shows the button incorrectly when scrolling up and down, copy and paste the following code to try it out:However, this issue doesn't happen with a
VStack
, but I need to useLazyVStack
to simulate async data rendering.