Skip to content

[feature] multidrag pre-select and disable user select #2183

Closed
@UndercoverNL

Description

@UndercoverNL

So I am in need of a function in the multidrag plugin, which allows you to pre-select specific items in a list without the user needing to select them. I tried achieving this by assigning the selectedClass to the items which I want to pre-select, however this didn't work, and after looking in to the module, its probably because the item is also added to the multiDragElements array inside the MultiDrag.js file. Which doesn't seem to be exported in any way, so there won't be a way to add your own items to this.

I think this would be easily achievable by exporting the multiDragElements array so that you can add or remove items from it to achieve pre-selected behaviour.

Another function I would need with the function described above, is a variable which would disable users to select and unselect items. Which can just be a boolean.

The end behaviour of this (as an example) would be that you can have groups, which have items inside of them, and if you drag the group the items will drag with the group. Instead of moving just the group without the items with using default Sortable, or the user needing to select each product before moving the category to move them with their category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions