Skip to content
Merged
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
10 changes: 8 additions & 2 deletions src/components/Sortable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ type SortableOptionsProp = Omit<
| "onChange"
>;

type ExposedProps = {
containerRef: Ref<HTMLDivElement | null>;
sortable: Ref<Sortable | null>;
isDragging: Ref<boolean>;
}

const props = defineProps({
/** All SortableJS options are supported; events are handled by the `defineEmits` below and should be used with v-on */
options: {
Expand Down Expand Up @@ -76,9 +82,9 @@ const getKey = computed(() => {

defineExpose({
containerRef,
sortable: <Ref<Sortable | null>>sortable,
sortable,
isDragging,
});
} as ExposedProps);

watch(containerRef, (newDraggable) => {
if (newDraggable) {
Expand Down