Skip to content

Commit

Permalink
Fixed #513
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Sep 29, 2020
1 parent f8286bf commit edfe9e8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/datatable/ScrollableView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</table>
</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">
<colgroup>
<template v-for="(col,i) of columns">
Expand Down Expand Up @@ -208,7 +208,13 @@ export default {
},
bodyTableStyle() {
return this.virtualScroll ? {top: '0'} : null;
}
},
bodyStyle() {
return {
maxHeight: this.scrollHeight !== 'flex' ? this.scrollHeight: null,
overflowY: !this.frozen && this.scrollHeight ? 'scroll': null
}
}
},
components: {
'DTTableLoadingBody': TableLoadingBody
Expand Down

0 comments on commit edfe9e8

Please sign in to comment.