Merge pull request #3743 from SergioCrisostomo/tab-patches
Fix 3732 - add prop for capturing focus
This commit is contained in:
commit
cbff5e3641
1 changed files with 5 additions and 1 deletions
|
@ -84,6 +84,10 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
captureFocus: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
closable: {
|
closable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
@ -376,7 +380,7 @@
|
||||||
[...this.$refs.panes.children].forEach((el, i) => {
|
[...this.$refs.panes.children].forEach((el, i) => {
|
||||||
if (index === i) {
|
if (index === i) {
|
||||||
[...el.children].forEach(child => child.style.visibility = 'visible');
|
[...el.children].forEach(child => child.style.visibility = 'visible');
|
||||||
setTimeout(() => focusFirst(el, el), transitionTime);
|
if (this.captureFocus) setTimeout(() => focusFirst(el, el), transitionTime);
|
||||||
} else {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
[...el.children].forEach(child => child.style.visibility = 'hidden');
|
[...el.children].forEach(child => child.style.visibility = 'hidden');
|
||||||
|
|
Loading…
Add table
Reference in a new issue