Fixed horizontal only scroll

pull/1196/head^2
Cagatay Civici 2021-05-15 13:12:56 +03:00
parent 729133f428
commit d8fac497c7
1 changed files with 13 additions and 0 deletions

View File

@ -264,6 +264,16 @@ export default {
this.d_multiSortMeta = newValue;
}
},
mounted() {
if (this.scrollable && this.scrollDirection !== 'vertical') {
this.updateScrollWidth();
}
},
updated() {
if (this.scrollable && this.scrollDirection !== 'vertical') {
this.updateScrollWidth();
}
},
methods: {
columnProp(col, prop) {
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
@ -739,6 +749,9 @@ export default {
},
hasGlobalFilter() {
return this.filters && Object.prototype.hasOwnProperty.call(this.filters, 'global');
},
updateScrollWidth() {
this.$refs.table.style.width = this.$refs.table.scrollWidth + 'px';
}
},
computed: {