Aligned scrollbar
parent
3ae21b266d
commit
bfa9f99dc6
|
@ -13,7 +13,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-datatable-scrollable-body" ref="scrollBody" @scroll="onBodyScroll" :style="{maxHeight: scrollHeight !== 'flex' ? scrollHeight: null}">
|
<div class="p-datatable-scrollable-body" ref="scrollBody" @scroll="onBodyScroll" :style="bodyStyle">
|
||||||
<table ref="scrollTable" :class="bodyTableClass" :style="bodyTableStyle">
|
<table ref="scrollTable" :class="bodyTableClass" :style="bodyTableStyle">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<template v-for="(col,i) of columns">
|
<template v-for="(col,i) of columns">
|
||||||
|
@ -216,6 +216,12 @@ export default {
|
||||||
},
|
},
|
||||||
bodyTableStyle() {
|
bodyTableStyle() {
|
||||||
return this.virtualScroll ? {top: '0'} : null;
|
return this.virtualScroll ? {top: '0'} : null;
|
||||||
|
},
|
||||||
|
bodyStyle() {
|
||||||
|
return {
|
||||||
|
maxHeight: this.scrollHeight !== 'flex' ? this.scrollHeight: null,
|
||||||
|
overflowY: !this.frozen && this.scrollHeight ? 'scroll': null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue