-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add a way to prevent tabs switching #4273
Add a way to prevent tabs switching #4273
Comments
I've though using v-model and verify if the form is saved and return to the tab if not, but if the tabs are "lazy" the component is destroyed and the form will be lost before you returned to the tab. |
You can set the For accessibility reasons, it is best to present the user with a disabled tab button than one that is clickable but doesn't do anything (as |
For convenience, I would like to alert my users that the form isn't saved and ask if they want to save/continue editing/discard changes and depending the choice they made, let them switch tabs. |
BootstrapVue |
Can you show any example, please ? how i call What do I do after this?
and do not receive this: I did not understand by the documentation, I'm obviously doing something wrong |
I have the exact same use case and had the exact same questions as @timoteo7. |
I found a working example here: |
Is your feature request related to a problem? Please describe...
I have a b-tabs with form in b-tab. If the form isn't saved before the tab is switch, I would like to prevent the tabs from switching to an other tab
Describe the solution you'd like
An event could be fired before changing the tab and preventDefault() or return false could stop the tab switching process
The text was updated successfully, but these errors were encountered: