Rather than (or in addition to) using an onSelect
prop: this.$emit('select', index)
.
Additionally, onSelect
fires every time a tab is selected, even if it's already the active tab. This may not be intended behavior, so:
switchTab(e, index, isDisabled) {
// Only fire event/function if not currently selected
if (!isDisabled && this.selectedIndex !== index) {
this.selectedIndex = index;
// Left in place for backwards compatibility
this.onSelect && this.onSelect(e, index);
// Not sure if the event variable is actually needed here
this.$emit('select', index);
}
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too