Skip to content

Commit

Permalink
bugfix for \.dismiss from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolONEOfficial committed Jun 8, 2023
1 parent af98246 commit 1c1557b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/NativePartialSheet/NativePartialSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ struct NativePartialSheetView<PrefContent: View>: UIViewRepresentable {
@ViewBuilder
var rootView: some View {
if prefs.isPresented.wrappedValue {
prefs.content()
prefs.content().onDisappear {
prefs.isPresented.wrappedValue = false // bugfix for `https://github.com/CoolONEOfficial/NativePartialSheet/issues/2`
}
}
}

Expand Down

0 comments on commit 1c1557b

Please sign in to comment.