Fixed #2813 - Add tabindex property to VirtualScroller
parent
0552ee1268
commit
50b97bc720
|
@ -94,6 +94,12 @@ const VirtualScrollerProps = [
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
default: "false",
|
default: "false",
|
||||||
description: "Whether to show loader."
|
description: "Whether to show loader."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tabindex",
|
||||||
|
type: "number|string",
|
||||||
|
default: "0",
|
||||||
|
description: "Index of the element in tabbing order."
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,11 @@ export interface VirtualScrollerProps {
|
||||||
* @param {VirtualScrollerLazyEvent} event - Custom lazy event.
|
* @param {VirtualScrollerLazyEvent} event - Custom lazy event.
|
||||||
*/
|
*/
|
||||||
onLazyLoad?: (event: VirtualScrollerLazyEvent) => void;
|
onLazyLoad?: (event: VirtualScrollerLazyEvent) => void;
|
||||||
|
/**
|
||||||
|
* Index of the element in tabbing order.
|
||||||
|
* Default value is 0.
|
||||||
|
*/
|
||||||
|
tabindex?: number | string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VirtualScrollerSlots {
|
export interface VirtualScrollerSlots {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<template v-if="!disabled">
|
<template v-if="!disabled">
|
||||||
<div :ref="elementRef" :class="containerClass" :tabindex="0" :style="style" @scroll="onScroll">
|
<div :ref="elementRef" :class="containerClass" :tabindex="tabindex" :style="style" @scroll="onScroll">
|
||||||
<slot name="content" :styleClass="contentClass" :items="loadedItems" :getItemOptions="getOptions" :loading="d_loading" :getLoaderOptions="getLoaderOptions" :itemSize="itemSize"
|
<slot name="content" :styleClass="contentClass" :items="loadedItems" :getItemOptions="getOptions" :loading="d_loading" :getLoaderOptions="getLoaderOptions" :itemSize="itemSize"
|
||||||
:rows="loadedRows" :columns="loadedColumns" :contentRef="contentRef" :spacerStyle="spacerStyle" :contentStyle="contentStyle"
|
:rows="loadedRows" :columns="loadedColumns" :contentRef="contentRef" :spacerStyle="spacerStyle" :contentStyle="contentStyle"
|
||||||
:vertical="isVertical()" :horizontal="isHorizontal()" :both="isBoth()">
|
:vertical="isVertical()" :horizontal="isHorizontal()" :both="isBoth()">
|
||||||
|
@ -87,6 +87,10 @@ export default {
|
||||||
showLoader: {
|
showLoader: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
tabindex: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -220,6 +220,12 @@ export default {
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>Whether to show loader.</td>
|
<td>Whether to show loader.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>tabindex</td>
|
||||||
|
<td>number</td>
|
||||||
|
<td>0</td>
|
||||||
|
<td>Index of the element in tabbing order.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue