Skip to content

feat(drag-drop): add the ability to disable sorting in a list - #15064

Merged
jelbourn merged 1 commit into
angular:masterfrom
crisbeto:14838/drag-drop-disable-sorting
Feb 22, 2019
Merged

feat(drag-drop): add the ability to disable sorting in a list#15064
jelbourn merged 1 commit into
angular:masterfrom
crisbeto:14838/drag-drop-disable-sorting

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Adds the ability to disable sorting inside of a CdkDropList. This allows for use cases where one list is considered the source and one or more connected lists are the destinations, and the user isn't supposed to sort the items within the source list.

Fixes#14838.

@crisbetocrisbeto added the target: minor This PR is targeted for the next minor release label Feb 2, 2019
@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 2, 2019
@crisbeto
crisbetoforce-pushed the 14838/drag-drop-disable-sorting branch from 264a689 to 2865ac8CompareFebruary 2, 2019 15:52
@LordMidi

Copy link
Copy Markdown

Thanks for implementing. When can we expect this feature to be merged?

@jelbournjelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment threadsrc/cdk/drag-drop/drop-list-ref.ts Outdated
const currentIndex = this._activeDraggables.indexOf(item);
const newPositionReference = this._activeDraggables[newIndex];
// If sorting is disabled, we want the item to return to its starting
// position, if the user is returning it to its initial container.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: omit comma after "position"

@jelbournjelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Feb 20, 2019
Adds the ability to disable sorting inside of a `CdkDropList`. This allows for use cases where one list is considered the source and one or more connected lists are the destinations, and the user isn't supposed to sort the items within the source list.
Fixesangular#14838.
@crisbeto
crisbetoforce-pushed the 14838/drag-drop-disable-sorting branch from 2865ac8 to 9cb2afcCompareFebruary 20, 2019 06:57
@jelbourn
jelbourn merged commit 629460f into angular:masterFeb 22, 2019
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 9, 2019
Documents the functionality from angular#15064 and adds a live example.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 9, 2019
Documents the functionality from angular#15064 and adds a live example.
mmalerba pushed a commit that referenced this pull request Mar 11, 2019
Documents the functionality from #15064 and adds a live example.
Suresh918 pushed a commit to Suresh918/material2 that referenced this pull request Apr 15, 2019
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 10, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License Agreementtarget: minorThis PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants

@crisbeto@LordMidi@jelbourn@googlebot