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
Should re-present when sheet
/fullScreenCover
/popover
identity changes
#75
Comments
sheet
/confirmationDialog
/popover
identity changessheet
/fullScreenCover
/popover
identity changes
Is this the cause of a |
@Zeta611 It shouldn't be! That sounds like a gnarly SwiftUI bug, though, if you want to share a repro and file a feedback with Apple. |
@stephencelis I think he's referring to this https://stackoverflow.com/q/69101690 which I've stumbled upon whilst using the nav branch in TCA as well, so yeah I'm pretty sure it's a vanilla SwiftUI bug. |
Is there a workaround for this until this work is done? |
@Muhammed9991 You should always be able to stagger the updates, e.g. |
Our view modifier overloads currently call down to the
isPresented: Binding<Bool>
versions, which can lead to some unwanted behavior: for example, if a presented sheet changes to another presented sheet, this change occurs without animation (brought up in discussion #73).We can fix this by calling down to the
item: Binding<Item?>
APIs instead. This means making sure that the "item" being presented is identifiable, but we can hopefully create a lightweight wrapper type to represent this info. Rather than requiring the value itself to conform toIdentifiable
, we can identify based off a combination of:ObjectIdentifier(Value.self)
).enumTag
helper or something similar.Value as? any Identifiable
.If anyone wants to take a shot at supporting this, we'd gladly take a PR! Otherwise we'll try to get to it soon.
The text was updated successfully, but these errors were encountered: