Skip to content

Commit c04f440

Browse files
fix: modal not being presented on app launch
1 parent d7cb6cf commit c04f440

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/ComponentsKit/Components/Modal/SwiftUI/Helpers/ModalPresentationModifier.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ struct ModalPresentationModifier<Modal: View>: ViewModifier {
2323

2424
func body(content: Content) -> some View {
2525
content
26+
.onAppear {
27+
if self.isContentVisible {
28+
self.isPresented = true
29+
}
30+
}
2631
.onChange(of: self.isContentVisible) { newValue in
2732
if newValue {
2833
self.isPresented = true

0 commit comments

Comments
 (0)