@splicetree/plugin-dnd 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const dnd = {
|
|
|
15
15
|
name: "dnd",
|
|
16
16
|
setup(ctx) {
|
|
17
17
|
const { autoUpdateParent = true, autoExpandOnDrop = true } = ctx.options?.configuration?.dnd ?? {};
|
|
18
|
-
const parentField = ctx.tree.options?.parentField ?? "parent";
|
|
18
|
+
const parentField = ctx.tree.options?.configuration?.parentField ?? ctx.tree.options?.parentField ?? "parent";
|
|
19
19
|
let draggingId;
|
|
20
20
|
const hoverPositions = /* @__PURE__ */ new Map();
|
|
21
21
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splicetree/plugin-dnd",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "michael.cocova@gmail.com",
|
|
7
7
|
"name": "Michael Cocova"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@splicetree/core": "0.
|
|
26
|
+
"@splicetree/core": "0.2.0"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"dev": "tsdown --watch",
|
package/src/index.ts
CHANGED
|
@@ -118,7 +118,7 @@ export const dnd: SpliceTreePlugin = {
|
|
|
118
118
|
autoExpandOnDrop?: boolean
|
|
119
119
|
}
|
|
120
120
|
const { autoUpdateParent = true, autoExpandOnDrop = true } = cfg
|
|
121
|
-
const parentField = ctx.tree.options?.parentField ?? 'parent'
|
|
121
|
+
const parentField = ctx.tree.options?.configuration?.parentField ?? 'parent'
|
|
122
122
|
let draggingId: string | undefined
|
|
123
123
|
const hoverPositions = new Map<string, DropPosition>()
|
|
124
124
|
|