Skip to content

SortableEvent missing clonedData field type #234

@crystalfp

Description

@crystalfp

I need to access the data of a removed entry. So my @remove routine is this:

const onRemoved = (entry: SortableEvent): void => {
    removedIds.push((entry as SortableEvent&{clonedData: {id: string}}).clonedData.id);
};

I had to make this contrived typing to satisfy typescript.
Seems that something is missing in the SortableEvent type definition.
Or is there a better method to access the cloned element?
Thanks!
mario

"vue-draggable-plus": "^0.6.0"
Windows 11 & Chromium: 134.0.6998.44
"vue": "^3.5.13"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions