Skip to content

Commit

Permalink
Make top-level folders selectable
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-berry committed Dec 24, 2024
1 parent 1919785 commit 9d7ebdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/stash-list/folder-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@drop-inside="dropInside"
>
<template #item="{item}: {item: Node}">
<Folder v-if="isVisible(item)" :folder="item" is-toplevel />
<Folder v-if="isVisible(item)" :folder="item" />
</template>
</dnd-list>
</template>
Expand Down Expand Up @@ -89,7 +89,10 @@ export default defineComponent({
},
drag(ev: ListDragEvent<Node>) {
sendDragData(ev.data, [ev.item]);
const items = the.model.selection.info(ev.item).isSelected
? Array.from(the.model.selection.selectedItems())
: [ev.item];
sendDragData(ev.data, items);
},
drop(ev: ListDropEvent) {
Expand Down
2 changes: 0 additions & 2 deletions src/stash-list/folder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
}"
>
<item-icon
v-if="!isToplevel"
:class="{
'forest-icon': true,
action: true,
Expand Down Expand Up @@ -273,7 +272,6 @@ export default defineComponent({
props: {
folder: required(Object as PropType<Folder>),
isToplevel: Boolean,
},
data: () => ({
Expand Down

0 comments on commit 9d7ebdb

Please sign in to comment.