Skip to content

Commit

Permalink
Expand tag on drop if not already expanded
Browse files Browse the repository at this point in the history
  • Loading branch information
RvanderLaan committed Nov 23, 2021
1 parent 1319a40 commit 3601dd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/frontend/containers/Outliner/TagsPanel/TagsTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ const TagItem = observer((props: ITagItemProps) => {
? 0
: 'middle'; // Not dragged at top or bottom, but in middle

// Expand the tag if it's not already expanded
if (!expansion[nodeData.id]) {
dispatch(Factory.setExpansion((val) => ({ ...val, [nodeData.id]: true })));
}

// Note to self: 'pos' does not start from 0! It is +1'd. So, here we -1 it again
if (dndData.source?.isSelected) {
if (relativeMovePos === 'middle') {
Expand Down

0 comments on commit 3601dd1

Please sign in to comment.