File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
src/components/scroll-area Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 44 <q-toggle v-model =" customStyle" label =" Custom style" />
55 <q-toggle v-model =" alwaysVisible" toggle-indeterminate label =" Always visible" />
66 <q-toggle v-model =" darkVariant" toggle-indeterminate label =" Dark variant" />
7+ <q-toggle v-model =" focusable" label =" Focusable" />
78
89 <div style =" height : 300px ;" />
910
1617 :visible =" alwaysVisible"
1718 :bar-style =" customStyle === true ? customBarStyle : void 0"
1819 :thumb-style =" customStyle === true ? customThumbStyle : void 0"
20+ :tabindex =" focusable === true ? 0 : void 0"
1921 >
2022 <div :class =" { 'flex no-wrap' : horizontal }" >
2123 <div style =" margin-top : 150px " />
3436 :horizontal =" horizontal"
3537 :visible =" alwaysVisible"
3638 dark
39+ :tabindex =" focusable === true ? 0 : void 0"
3740 >
3841 <div :class =" { 'flex no-wrap' : horizontal }" >
3942 <div style =" margin-top : 150px " />
@@ -73,7 +76,8 @@ export default {
7376 number: 10 ,
7477 horizontal: false ,
7578 alwaysVisible: true ,
76- customStyle: true
79+ customStyle: true ,
80+ focusable: true
7781 }
7882 },
7983
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ export default Vue.extend({
3737 default : null
3838 } ,
3939
40- horizontal : Boolean
40+ horizontal : Boolean ,
41+
42+ tabindex : [ String , Number ]
4143 } ,
4244
4345 data ( ) {
@@ -138,6 +140,12 @@ export default Vue.extend({
138140 } ,
139141 value : this . __panThumb
140142 } ]
143+ } ,
144+
145+ scrollAttrs ( ) {
146+ if ( this . tabindex !== void 0 ) {
147+ return { tabindex : this . tabindex }
148+ }
141149 }
142150 } ,
143151
@@ -267,7 +275,8 @@ export default Vue.extend({
267275 } , [
268276 h ( 'div' , {
269277 ref : 'target' ,
270- staticClass : 'scroll relative-position fit hide-scrollbar'
278+ staticClass : 'scroll relative-position fit hide-scrollbar' ,
279+ attrs : this . scrollAttrs
271280 } , [
272281 h ( 'div' , {
273282 staticClass : 'absolute' ,
Original file line number Diff line number Diff line change 5757 "type" : " Boolean" ,
5858 "desc" : " Register for horizontal scroll instead of vertical (which is default)" ,
5959 "category" : " behavior"
60+ },
61+
62+ "tabindex" : {
63+ "extends" : " tabindex"
6064 }
6165 },
6266
You can’t perform that action at this time.
0 commit comments