Skip to content

Commit

Permalink
Check that double clicked item is the same
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
  • Loading branch information
jimtng committed Feb 15, 2024
1 parent 9ff741b commit 444c6b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default {
includeItemTags: false,
expanded: false,
doubleClickStarted: null,
doubleClickItem: null,
items: [],
links: [],
locations: [],
Expand Down Expand Up @@ -278,10 +279,11 @@ export default {
selectItem (item) {
if (!this.multiple) {
this.selectedItem = item
if (this.doubleClickStarted) {
if (this.doubleClickStarted && this.doubleClickItem === item) {
this.pickItems()
} else {
this.doubleClickStarted = setTimeout(() => { this.doubleClickStarted = null }, 500)
this.doubleClickItem = item
}
} else if (item.children && item.opened !== undefined) {
item.opened = !item.opened
Expand Down

0 comments on commit 444c6b2

Please sign in to comment.