Fixed #1646 - Kebab-case properties are not working on DataTable and TreeTable
parent
5c48a12347
commit
306b38ef5d
|
@ -428,7 +428,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
columnProp(col, prop) {
|
columnProp(col, prop) {
|
||||||
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
|
return ObjectUtils.getVNodeProp(col, prop);
|
||||||
},
|
},
|
||||||
onPage(event) {
|
onPage(event) {
|
||||||
this.clearEditingMetaData();
|
this.clearEditingMetaData();
|
||||||
|
|
|
@ -193,7 +193,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
columnProp(col, prop) {
|
columnProp(col, prop) {
|
||||||
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
|
return ObjectUtils.getVNodeProp(col, prop);
|
||||||
},
|
},
|
||||||
shouldRenderRowGroupHeader(value, rowData, i) {
|
shouldRenderRowGroupHeader(value, rowData, i) {
|
||||||
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.groupRowsBy);
|
let currentRowFieldData = ObjectUtils.resolveFieldData(rowData, this.groupRowsBy);
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import FooterCell from './FooterCell.vue';
|
import FooterCell from './FooterCell.vue';
|
||||||
|
import {ObjectUtils} from 'primevue/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TableFooter',
|
name: 'TableFooter',
|
||||||
|
@ -32,7 +33,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
columnProp(col, prop) {
|
columnProp(col, prop) {
|
||||||
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
|
return ObjectUtils.getVNodeProp(col, prop);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
import HeaderCell from './HeaderCell.vue';
|
import HeaderCell from './HeaderCell.vue';
|
||||||
import HeaderCheckbox from './HeaderCheckbox.vue';
|
import HeaderCheckbox from './HeaderCheckbox.vue';
|
||||||
import ColumnFilter from './ColumnFilter.vue';
|
import ColumnFilter from './ColumnFilter.vue';
|
||||||
|
import {ObjectUtils} from 'primevue/utils';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TableHeader',
|
name: 'TableHeader',
|
||||||
|
@ -121,7 +122,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
columnProp(col, prop) {
|
columnProp(col, prop) {
|
||||||
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
|
return ObjectUtils.getVNodeProp(col, prop);
|
||||||
},
|
},
|
||||||
getFilterColumnHeaderClass(column) {
|
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'), {
|
||||||
|
|
|
@ -280,7 +280,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
columnProp(col, prop) {
|
columnProp(col, prop) {
|
||||||
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
|
return ObjectUtils.getVNodeProp(col, prop);
|
||||||
},
|
},
|
||||||
onNodeToggle(node) {
|
onNodeToggle(node) {
|
||||||
const key = node.key;
|
const key = node.key;
|
||||||
|
@ -693,7 +693,7 @@ export default {
|
||||||
else if (this.columnResizeMode === 'expand') {
|
else if (this.columnResizeMode === 'expand') {
|
||||||
this.$refs.table.style.width = this.$refs.table.offsetWidth + delta + 'px';
|
this.$refs.table.style.width = this.$refs.table.offsetWidth + delta + 'px';
|
||||||
|
|
||||||
if (!this.scrollable)
|
if (!this.scrollable)
|
||||||
this.resizeColumnElement.style.width = newColumnWidth + 'px';
|
this.resizeColumnElement.style.width = newColumnWidth + 'px';
|
||||||
else
|
else
|
||||||
this.resizeTableCells(newColumnWidth);
|
this.resizeTableCells(newColumnWidth);
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {DomHandler} from 'primevue/utils';
|
import {DomHandler, ObjectUtils} from 'primevue/utils';
|
||||||
import BodyCell from './BodyCell.vue';
|
import BodyCell from './BodyCell.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
||||||
nodeTouched: false,
|
nodeTouched: false,
|
||||||
methods: {
|
methods: {
|
||||||
columnProp(col, prop) {
|
columnProp(col, prop) {
|
||||||
return col.props ? ((col.type.props[prop].type === Boolean && col.props[prop] === '') ? true : col.props[prop]) : null;
|
return ObjectUtils.getVNodeProp(col, prop);
|
||||||
},
|
},
|
||||||
toggle() {
|
toggle() {
|
||||||
this.$emit('node-toggle', this.node);
|
this.$emit('node-toggle', this.node);
|
||||||
|
|
Loading…
Reference in New Issue