fix: drag-to-create parent group is now an empty container
When dragging B onto A, the result is now: - New Group (empty, no file) - File A - File B Previously the group inherited A's file, creating a self-referencing parent.
This commit is contained in:
@@ -1048,10 +1048,13 @@ export class WaypointView extends ItemView {
|
||||
const newGroup: BookmarkItem = {
|
||||
id: `bm-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`,
|
||||
type: 'group',
|
||||
label: target.label,
|
||||
filePath: target.filePath || '',
|
||||
label: 'New Group',
|
||||
filePath: '',
|
||||
icon: '',
|
||||
children: [{ ...target, indent: 1 }, { ...dragged, indent: 1 }],
|
||||
children: [
|
||||
{ ...target, indent: target.indent + 1 },
|
||||
{ ...dragged, indent: target.indent + 1 },
|
||||
],
|
||||
collapsed: false,
|
||||
indent: target.indent,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user