Refactor #4149 - Column & TreeTable

This commit is contained in:
Tuğçe Küçükoğlu 2023-07-17 12:23:09 +03:00
parent b06f90d883
commit ee637daf39
7 changed files with 70 additions and 15 deletions

View file

@ -14,7 +14,7 @@
@click="onClick"
@keydown="onKeyDown"
@touchend="onTouchEnd"
v-bind="ptm('row')"
v-bind="ptm('row', ptmOptions)"
:data-p-highlight="selected"
>
<template v-for="(col, i) of columns" :key="columnProp(col, 'columnKey') || columnProp(col, 'field') || i">
@ -413,6 +413,14 @@ export default {
},
getAriaSelected() {
return this.selectionMode === 'single' || this.selectionMode === 'multiple' ? this.selected : null;
},
ptmOptions() {
return {
context: {
selectable: this.$parentInstance.rowHover || this.$parentInstance.rowSelectionMode,
selected: this.selected
}
};
}
},
components: {