Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update options to allow drag/drop betweeen parents and children #4516

Merged
merged 2 commits into from Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@

* Allows to disable page refresh on content changed for page types.

### Fixes

* Fixes drag and drop regression in the page tree where pages were not able to be moved between parent and child.

## 4.2.0 (2024-04-18)

* Typing a `/` in the title field of a page no longer confuses the slug field. Thanks to [Gauav Kumar](https://github.com/gkumar9891).
Expand Down
6 changes: 4 additions & 2 deletions modules/@apostrophecms/ui/ui/apos/components/AposTreeRows.vue
@@ -1,10 +1,10 @@
<template>
<draggable
v-bind="dragOptions"
item-key="_id"
class="apos-tree__list"
tag="ol"
:list="rows"
:options="dragOptions"
@start="startDrag"
@end="endDrag"
>
Expand Down Expand Up @@ -208,7 +208,9 @@ export default {
},
dragOptions() {
return {
group: { name: this.treeId },
group: this.treeId,
fallbackOnBody: true,
swapThreshold: 0.65,
dataListId: this.listId,
disabled: !this.options.draggable,
handle: '.apos-tree__row__icon--handle',
Expand Down