pull/1196/head^2
mertsincan 2021-05-15 13:29:00 +03:00
commit 3f0d35cc20
6 changed files with 33 additions and 4 deletions

View File

@ -165,6 +165,13 @@ export default {
}
this.styleObject.left = left + 'px';
}
let filterRow = this.$el.parentElement.nextElementSibling;
if (filterRow) {
let index = DomHandler.index(this.$el);
filterRow.children[index].style.left = this.styleObject.left;
filterRow.children[index].style.right = this.styleObject.right;
}
}
},
onHeaderCheckboxChange(event) {

View File

@ -120,7 +120,9 @@ export default {
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
},
getFilterColumnHeaderClass(column) {
return ['p-filter-column', this.columnProp(column, 'filterHeaderClass'), this.columnProp(column, 'class')];
return ['p-filter-column', this.columnProp(column, 'filterHeaderClass'), this.columnProp(column, 'class'), {
'p-frozen-column': this.columnProp(column, 'frozen')
}];
},
getFilterColumnHeaderStyle(column) {
return [this.columnProp(column, 'filterHeaderStyle'), this.columnProp(column, 'style')];

View File

@ -121,7 +121,7 @@ export default {
},
computed: {
containerClass() {
return [this.columnProp('bodyClass'), {
return [this.columnProp('bodyClass'), this.columnProp('class'), {
'p-frozen-column': this.columnProp('frozen')
}];
},

View File

@ -59,7 +59,7 @@ export default {
},
computed: {
containerClass() {
return [this.columnProp('footerClass'), {
return [this.columnProp('footerClass'), this.columnProp('class'), {
'p-frozen-column': this.columnProp('frozen')
}];
},

View File

@ -79,6 +79,13 @@ export default {
}
this.styleObject.left = left + 'px';
}
let filterRow = this.$el.parentElement.nextElementSibling;
if (filterRow) {
let index = DomHandler.index(this.$el);
filterRow.children[index].style.left = this.styleObject.left;
filterRow.children[index].style.right = this.styleObject.right;
}
}
},
onClick(event) {
@ -114,7 +121,7 @@ export default {
},
computed: {
containerClass() {
return [this.columnProp('headerClass'), {
return [this.columnProp('headerClass'), this.columnProp('class'), {
'p-sortable-column': this.columnProp('sortable'),
'p-resizable-column': this.resizableColumns,
'p-highlight': this.isColumnSorted(),

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: {