Skip to content

Commit

Permalink
Fixed metakey selection
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Aug 5, 2019
1 parent 0b90fd0 commit f263c1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/tree/Tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
const originalEvent = event.originalEvent;
const node = event.node;
const metaKey = (originalEvent.metaKey||originalEvent.ctrlKey);
const selected = this.selected;
const selected = this.isNodeSelected(node);
let _selectionKeys;
if (selected && metaKey) {
Expand Down Expand Up @@ -147,7 +147,7 @@ export default {
},
handleSelectionWithoutMetaKey(event) {
const node = event.node;
const selected = this.isSelected(node);
const selected = this.isNodeSelected(node);
let _selectionKeys;
if (this.isSingleSelectionMode()) {
Expand Down Expand Up @@ -184,7 +184,7 @@ export default {
isMultipleSelectionMode() {
return this.selectionMode === 'multiple';
},
isSelected(node) {
isNodeSelected(node) {
return (this.selectionMode && this.selectionKeys) ? this.selectionKeys[node.key] === true : false;
},
isChecked(node) {
Expand Down Expand Up @@ -336,6 +336,7 @@ export default {
display: inline-block;
padding: 0 .25em;
vertical-align: middle;
user-select: none;
}
.p-tree .p-treenode.p-treenode-leaf > .p-treenode-content > .p-tree-toggler {
Expand Down

0 comments on commit f263c1a

Please sign in to comment.