File tree 1 file changed +6
-6
lines changed
packages/svelte-file-tree/src/lib/components
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class TreeItemStateImpl<TNode extends FileNode | FolderNode<TNode> = FileTreeNod
67
67
readonly inClipboard : boolean = $derived . by ( ( ) => this . clipboardIds ( ) . has ( this . node . id ) ) ;
68
68
69
69
readonly disabled : boolean = $derived . by ( ( ) => {
70
- if ( this . parent ?. disabled === true ) {
70
+ if ( this . parent ?. disabled ) {
71
71
return true ;
72
72
}
73
73
@@ -83,15 +83,15 @@ class TreeItemStateImpl<TNode extends FileNode | FolderNode<TNode> = FileTreeNod
83
83
} ) ;
84
84
85
85
readonly dragged : boolean = $derived . by ( ( ) => {
86
- if ( this . draggedId ( ) === undefined ) {
87
- return false ;
86
+ if ( this . parent ?. dragged ) {
87
+ return true ;
88
88
}
89
89
90
- if ( this . draggedId ( ) === this . node . id ) {
91
- return true ;
90
+ if ( this . draggedId ( ) === undefined ) {
91
+ return false ;
92
92
}
93
93
94
- return this . selected && this . parent ?. dragged !== true ;
94
+ return this . draggedId ( ) === this . node . id || this . selected ;
95
95
} ) ;
96
96
}
97
97
You can’t perform that action at this time.
0 commit comments