Fixed alignment issue in scrollable table

pull/411/head
cagataycivici 2020-07-18 14:20:30 +03:00
parent 6c3bf57afc
commit 6fb69df249
1 changed files with 3 additions and 3 deletions

View File

@ -17,14 +17,14 @@
<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">
<col v-if="shouldRenderCol(col)" :key="col.columnKey||col.field||i" :style="col.bodyStyle" /> <col v-if="shouldRenderCol(col)" :key="col.columnKey||col.field||i" :style="col.bodyStyle || col.headerStyle" />
</template> </template>
</colgroup> </colgroup>
<slot name="body"></slot> <slot name="body"></slot>
</table> </table>
<table ref="loadingTable" :style="{top:'0', display: 'none'}" class="p-datatable-scrollable-body-table p-datatable-loading-virtual-table p-datatable-virtual-table" v-if="virtualScroll"> <table ref="loadingTable" :style="{top:'0', display: 'none'}" class="p-datatable-scrollable-body-table p-datatable-loading-virtual-table p-datatable-virtual-table" v-if="virtualScroll">
<colgroup> <colgroup>
<col v-for="(col,i) of columns" :key="col.columnKey||col.field||i" :style="col.bodyStyle" /> <col v-for="(col,i) of columns" :key="col.columnKey||col.field||i" :style="col.bodyStyle || col.headerStyle" />
</colgroup> </colgroup>
<DTTableLoadingBody :columns="columns" :rows="rows" /> <DTTableLoadingBody :columns="columns" :rows="rows" />
</table> </table>
@ -35,7 +35,7 @@
<table class="p-datatable-scrollable-footer-table"> <table class="p-datatable-scrollable-footer-table">
<colgroup> <colgroup>
<template v-for="(col,i) of columns"> <template v-for="(col,i) of columns">
<col v-if="shouldRenderCol(col)" :key="col.columnKey||col.field||i" :style="col.footerStyle" /> <col v-if="shouldRenderCol(col)" :key="col.columnKey||col.field||i" :style="col.footerStyle || col.headerStyle" />
</template> </template>
</colgroup> </colgroup>
<slot name="footer"></slot> <slot name="footer"></slot>