-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(b-tabs): emit cancelable BvEvent before changing tabs via new activate-tab event (closes #4273)
#4274
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #4274 +/- ##
==========================================
+ Coverage 99.91% 99.91% +<.01%
==========================================
Files 237 237
Lines 4548 4550 +2
Branches 1280 1280
==========================================
+ Hits 4544 4546 +2
Misses 3 3
Partials 1 1
Continue to review full report at Codecov.
|
|
Thanks @tmorehouse! That was fast! Hopefully it will be approved and merged as quickly as you worked! |
|
@vincentdh Not sure when it will be released yet... will be part of the 2.1.0 release.... hopefully out by the end of next week (maybe earlier) |
activate-tab event (closes #4273)
Describe the PR
Emit new event
activate-tabbefore changing tabs.New event is emitted with three arguments:
newTabIndextab index that will be activatedprevTabIndextab index of the current active tab, or -1 if no active tabbvEvtBvEvent object instanceCalling
bvEvt.preventDefault()will prevent the tab from activating.Ideally users should be setting the
disabledprop on any<b-tab>they don't want users to activate (better for accessibility). If users do use this event to prevent a tab from activating, they should provide feedback to the user as to why the tab cannot be activated (i.e. an alert, etc).Closes #4273
To Do:
PR checklist
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
devbranch, not themasterbranch[...] (fixes #xxx[,#xxx]), where "xxx" is the issue number)fix(alert): not alerting during SSR render,docs(badge): update pill examples, fix typos,chore: fix typo in README, etc). This is very important, as theCHANGELOGis generated from these messages.If new features/enhancement/fixes are added or changed:
package.jsonfor slot and event changes)If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes: