PopupView
PopupView copied to clipboard
[BUG] Isn't triggering NavigationLink supported in Popups?
Prerequisites
- [ YES ] I checked the documentation and found no answer
- [ YES ] I checked to make sure that this issue has not already been filed
Expected Behavior
For example, in the scenario where I use Popups to pop up some functions, they need to be logged in before they can be triggered. Therefore, after clicking, NavigationLink needs to be triggered to jump to the login page. However, the login page is not a Popups type, but a simple View.
Current Behavior
Currently there is no effect after clicking
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
After clicking click, there is no effect
Code Sample
import MijickPopups
import SwiftUI
struct Bottom_DragDetentPopup: BottomPopup {
@State private var navigateToLogin = false
var body: some View {
ZStack {
NavigationLink(
destination: Bottom_DragDetentPopupTest(),
isActive: $navigateToLogin
) {
EmptyView()
}
VStack(spacing: 0) {
Text("click")
.onTapGesture {
navigateToLogin = true
print("123")
}
}
.padding(.top, 12)
.padding(.bottom, 24)
}
}
func configurePopup(config: BottomPopupConfig) -> BottomPopupConfig {
config
.cornerRadius(40)
.dragDetents([.fraction(1.8), .large])
}
}
struct Bottom_DragDetentPopupTest: View {
var body: some View {
VStack(spacing: 0) {
Text("show")
}
.padding(.top, 12)
.padding(.bottom, 24)
}
}