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

[FEAT] - Prevent from closing #82

Closed
Pacn91 opened this issue Nov 5, 2020 · 10 comments
Closed

[FEAT] - Prevent from closing #82

Pacn91 opened this issue Nov 5, 2020 · 10 comments
Assignees
Labels
feature New feature or request

Comments

@Pacn91
Copy link

Pacn91 commented Nov 5, 2020

Hi,
Maybe there is an option to my request but I really couldn't find one.

It occurred to me, more than once, I wanted to disable the option to close the drawer until the user do 'some action'.
Would be nice if there was an option to prevent the drawer to close.

Maybe on 'onWillDismiss' we could call something to stop the closing action, for example.

Thanks in advance.

Best regards

@roman-rr
Copy link
Collaborator

roman-rr commented Nov 5, 2020

Hello @Pacn91 thank you for issue. I don't clear understand your request, please describe scenarios more detailed.
What is this situation where user already call .destroy() method, but not want to destroy pane ?

@Pacn91
Copy link
Author

Pacn91 commented Nov 5, 2020

Hi @roman-rr,
Thanks for the fast response.

What I was trying to say (sorry about my English xD) is for example: I want the user to open a drawer and select something. If he doesn't do that then he cannot close the drawer (by drag down or tapping the backdrop) until he selects something.

Imagine this:
The user have to select a connection. If he doesn't do that, then he can not close the drawer.
drawer

Thanks again :)

@roman-rr roman-rr self-assigned this Nov 5, 2020
@roman-rr roman-rr added the feature New feature or request label Nov 5, 2020
@EinfachHans
Copy link

Guess something like ionic-team/ionic-framework#22297

@roman-rr
Copy link
Collaborator

roman-rr commented Nov 9, 2020

@EinfachHans Thank you, good example. This issue also i plan to handle within next week. And sure, we need similar feature.

roman-rr added a commit that referenced this issue Nov 14, 2020
@roman-rr
Copy link
Collaborator

Implemented in v.1.1.94.
Check readme for preventDismiss() method.
Live example here

@EinfachHans
Copy link

@roman-rr i would like this more if the drag gesture is not possible to drag to bottom completly if a handler is set - check my ionic pr 🤔

@roman-rr
Copy link
Collaborator

@EinfachHans Seems that all what you need just set onDrag callback and show alert in some exact transformY position.

@Pacn91
Copy link
Author

Pacn91 commented Nov 16, 2020

Thank you very much @roman-rr :)

@EinfachHans
Copy link

@roman-rr i think it should cause some changed gesture then, not just start onDrag. See the Video of how it is in a native modal in the mentioned ionic issue

@EinfachHans
Copy link

@roman-rr i think the answer in the ionic issue was supposed to be here 😃 i will open a new FR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants