Skip to content
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

[BUG] Isn't triggering NavigationLink supported in Popups? #170

Open
ByLiangCheng opened this issue Jan 15, 2025 · 0 comments
Open

[BUG] Isn't triggering NavigationLink supported in Popups? #170

ByLiangCheng opened this issue Jan 15, 2025 · 0 comments

Comments

@ByLiangCheng
Copy link

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)
    }
}
@ByLiangCheng ByLiangCheng changed the title [BUG] 在 Popups 不支持触发 NavigationLink 吗? [BUG] Isn't triggering NavigationLink supported in Popups? Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant