From a09f66ec46104cacc13c68848121f88011e5b211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 14 Jul 2023 10:17:45 +0300 Subject: [PATCH] Fixed #4133 - Selection(multiple and single) not working in TreeTable --- components/lib/treetable/BaseTreeTable.vue | 4 ++-- components/lib/treetable/TreeTableRow.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lib/treetable/BaseTreeTable.vue b/components/lib/treetable/BaseTreeTable.vue index b2879d5a4..4758d93ff 100644 --- a/components/lib/treetable/BaseTreeTable.vue +++ b/components/lib/treetable/BaseTreeTable.vue @@ -174,10 +174,10 @@ const styles = ` `; const classes = { - root: ({ props }) => [ + root: ({ instance, props }) => [ 'p-treetable p-component', { - 'p-treetable-hoverable-rows': props.rowHover || props.rowSelectionMode, + 'p-treetable-hoverable-rows': props.rowHover || instance.rowSelectionMode, 'p-treetable-auto-layout': props.autoLayout, 'p-treetable-resizable': props.resizableColumns, 'p-treetable-resizable-fit': props.resizableColumns && props.columnResizeMode === 'fit', diff --git a/components/lib/treetable/TreeTableRow.vue b/components/lib/treetable/TreeTableRow.vue index d98c53cc4..212177c49 100755 --- a/components/lib/treetable/TreeTableRow.vue +++ b/components/lib/treetable/TreeTableRow.vue @@ -394,7 +394,7 @@ export default { }, computed: { containerClass() { - return [this.node.styleClass, this.cx('root')]; + return [this.node.styleClass, this.cx('row')]; }, expanded() { return this.expandedKeys && this.expandedKeys[this.node.key] === true;