Skip to content

[drag-drop] Allow to disable sorting within a CdkDropList #14838

Closed
@yarinr

Description

@yarinr

Please describe the feature you would like to request.

I want to be able to disable sorting within a CdkDropList. That is, I want to be able to drag items from a CdkDropList to it's connected CdkDropList, while not allowing items within the source CdkDropList to be swapped (sorted).

I guess it would be used as an input of CdkDropList, something like this: @Input('cdkDropListSortable') sortable: boolean, that when true will disable sorting within the drop list.

Also, if there's a way to achieve this behavior using the current API, I would love to hear about that. Searching online I found a few people asking the same question (https://stackoverflow.com/questions/53380336/how-to-disable-sort-in-a-cdkdroplist-using-angular-cdk-v7-0-0), but none received a relevant answer.

Thanks!

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions