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

Shouldn't use NavController to push a new View #23

Closed
luckyboykg opened this issue Apr 4, 2018 · 2 comments
Closed

Shouldn't use NavController to push a new View #23

luckyboykg opened this issue Apr 4, 2018 · 2 comments

Comments

@luckyboykg
Copy link

luckyboykg commented Apr 4, 2018

If you use NavController to push a new View, IONIC will treat this behavior like we change the View, the ionViewCanLeave will trigger.

It's not make sense for this case, we just open a dialog to choose some items and we don't want to push the new View.

When I need to check the Form is dirty or not I met this issues :
The event ionViewCanLeave will trigger every time this control opened.

My solution is : change from NavController to Modal dialog.

@luckyboykg luckyboykg changed the title Shouldn use NavController to push a new View Shouldn't use NavController to push a new View Apr 4, 2018
@eakoriakin
Copy link
Owner

Hi, I see... It seems like it would be better to use Modal rather than Page. I'll try to find some time to implement it.

@eakoriakin
Copy link
Owner

@GFoley83 thanks a lot for the PR, it saved me time 👍

Version 1.1.1 now has useModal parameter with true as default value:
https://github.com/eakoriakin/ionic-select-searchable/wiki/API-Documentation#usemodal

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

2 participants