Fixed #2756 - Add getVirtualScrollerRef method to DataTable to access virtualScroller's reference
parent
cd8b59bd16
commit
6898e45c6f
|
@ -18,7 +18,7 @@
|
|||
</template>
|
||||
</DTPaginator>
|
||||
<div class="p-datatable-wrapper" :style="{ maxHeight: virtualScrollerDisabled ? scrollHeight : '' }">
|
||||
<DTVirtualScroller v-bind="virtualScrollerOptions" :items="processedData" :columns="columns" :style="{ height: scrollHeight }" :disabled="virtualScrollerDisabled" loaderDisabled :showSpacer="false">
|
||||
<DTVirtualScroller ref="virtualScroller" v-bind="virtualScrollerOptions" :items="processedData" :columns="columns" :style="{ height: scrollHeight }" :disabled="virtualScrollerDisabled" loaderDisabled :showSpacer="false">
|
||||
<template #content="slotProps">
|
||||
<table ref="table" role="table" :class="[tableClass, 'p-datatable-table']" :style="[tableStyle, slotProps.spacerStyle]">
|
||||
<DTTableHeader :columnGroup="headerColumnGroup" :columns="slotProps.columns" :rowGroupMode="rowGroupMode"
|
||||
|
@ -1780,6 +1780,9 @@ export default {
|
|||
}
|
||||
|
||||
return _data;
|
||||
},
|
||||
getVirtualScrollerRef() {
|
||||
return this.$refs.virtualScroller;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Reference in New Issue