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

Fix: draggable deprecations #2491

Merged
merged 1 commit into from
Feb 27, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/js/components/Repeater.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="content">
<draggable class="content__content" v-model="blocks" :options="dragOptions">
<draggable class="content__content" v-model="blocks" v-bind="dragOptions">
<transition-group name="draggable_list" tag='div'>
<div class="content__item" v-for="(block, index) in blocks" :key="block.id">
<a17-blockeditor-item
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/Slideshow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a17-button :disabled="disabled" type="button" variant="ghost" @click="openMediaLibrary(remainingSlides)">{{ addLabel }}</a17-button>
<span class="slideshow__note f--small"><slot></slot></span>
</div>
<draggable class="slideshow__content" v-model="slides" :options="dragOptions" v-if="slides.length">
<draggable class="slideshow__content" v-model="slides" v-bind="dragOptions" v-if="slides.length">
<transition-group name="draggable_list" tag='div'>
<div class="slide" v-for="(slide, index) in slides" :key="`${slide.id}_${index}`">
<div class="slide__handle" v-if="!disabled">
Expand Down
4 changes: 2 additions & 2 deletions frontend/js/components/blocks/Blocks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
:value="savedBlocks"
group="blocks"
:move="handleOnMove"
@end="e => handleOnEnd(moveBlock, moveBlockToEditor)"
:options="dragOptions">
@end="handleOnEnd(moveBlock, moveBlockToEditor)"
v-bind="dragOptions">
<transition-group name="draggable_list"
tag='div'>
<div class="blocks__item"
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/buckets/Bucket.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
class="buckets__number">{{ (index + 1) }}</span> {{ bucket.name }}</span> <span
class="buckets__size-infos">{{ bucket.children.length }} / {{ bucket.max }}</span>
</h3>
<draggable v-if="bucket.children.length > 0" class="buckets__list buckets__draggable" :options="dragOptions"
<draggable v-if="bucket.children.length > 0" class="buckets__list buckets__draggable" v-bind="dragOptions"
@change="sortBucket($event, index)" :value="bucket.children" :tag="'table'">
<transition-group name="fade_scale_list" tag='tbody'>
<a17-bucket-item v-for="(child, index) in bucket.children" :key="`${child.id}_${index}`" :item="child"
Expand Down
3 changes: 2 additions & 1 deletion frontend/js/components/editor/EditorPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<draggable class="editorPreview__content"
ref="previewContent"
:value="blocks"
:options="{ group: 'editorBlocks', handle: handle }"
group="editorBlocks"
:handle="handle"
@add="onAdd(add, edit, $event)"
@update="onUpdate">
<template v-for="savedBlock in blocks">
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/table/Datatable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<a17-tablehead :columns="visibleColumns" ref="thead"/>
</thead>
<template v-if="draggable">
<draggable class="datatable__drag" :tag="'tbody'" v-model="rows" :options="dragOptions">
<draggable class="datatable__drag" :tag="'tbody'" v-model="rows" v-bind="dragOptions">
<template v-for="(row, index) in rows">
<a17-tablerow :row="row" :index="index" :columns="visibleColumns" :key="row.id"/>
</template>
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/table/nested/NestedList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<draggable class="nested__dropArea"
:class="nestedDropAreaClasses"
v-model="rows"
:options="draggableOptions"
v-bind="draggableOptions"
:tag="'ul'"
:component-data="draggableGetComponentData">
<li class="nested-datatable__item"
Expand Down
Loading