Skip to content

Commit 8ef8d7b

Browse files
committed
Merge branch 'main' into develop
2 parents 1cef16c + d8e17ef commit 8ef8d7b

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.0.15](https://github.com/vue-pivottable/vue3-pivottable/compare/vue-pivottable@1.0.14...vue-pivottable@1.0.15) (2025-06-05)
2+
3+
4+
### Bug Fixes
5+
6+
* delay Draggable render to prevent _sortable.option error on HMR [#150](https://github.com/vue-pivottable/vue3-pivottable/issues/150) ([2ea40c8](https://github.com/vue-pivottable/vue3-pivottable/commit/2ea40c83f39f561dd409e8da23f724fa7a08849e))
7+
18
## [1.0.14](https://github.com/vue-pivottable/vue3-pivottable/compare/vue-pivottable@1.0.13...vue-pivottable@1.0.14) (2025-05-13)
29

310

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-pivottable",
3-
"version": "1.0.14",
3+
"version": "1.0.15",
44
"type": "module",
55
"description": "",
66
"exports": {

src/components/pivottable-ui/VDragAndDropCell.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<template>
22
<Draggable
3+
v-if="showDraggable && modelItems.length > 0"
34
tag="td"
45
:list="modelItems"
5-
:group="{ name: 'sharted', pull: true, put: true }"
6+
:group="{ name: 'shared', pull: true, put: true }"
67
:ghost-class="'pvtPlaceholder'"
78
:prevent-on-filter="false"
89
:class="classes"
@@ -40,7 +41,7 @@
4041
</template>
4142

4243
<script setup>
43-
import { ref, onMounted, computed } from 'vue'
44+
import { ref, onMounted, computed, watch, nextTick, onBeforeUnmount } from 'vue'
4445
import { VueDraggableNext as Draggable } from 'vue-draggable-next'
4546
import VDraggableAttribute from './VDraggableAttribute.vue'
4647
@@ -95,6 +96,7 @@ const props = defineProps({
9596
})
9697
9798
const modelItems = ref([])
99+
const showDraggable = ref(false)
98100
99101
const onDragMove = (event) => {
100102
const draggedItem = event.draggedContext.element
@@ -118,8 +120,22 @@ const onDragEnd = () => {
118120
119121
onMounted(() => {
120122
modelItems.value = [...props.attributeNames]
123+
nextTick(() => {
124+
showDraggable.value = true
125+
})
121126
})
122127
128+
onBeforeUnmount(() => {
129+
showDraggable.value = false
130+
})
131+
132+
watch(
133+
() => props.attributeNames,
134+
(newVal) => {
135+
modelItems.value = [...newVal]
136+
}
137+
)
138+
123139
const hideDropDownForUnused = computed(() => {
124140
return props.cellType === 'unused' && props.hideFilterBoxOfUnusedAttributes
125141
})

0 commit comments

Comments
 (0)