-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(drag-drop): add the ability to disable sorting in a list #15064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(drag-drop): add the ability to disable sorting in a list #15064
Conversation
264a689
to
2865ac8
Compare
Thanks for implementing. When can we expect this feature to be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/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. |
There was a problem hiding this comment.
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"
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 angular#14838.
2865ac8
to
9cb2afc
Compare
Documents the functionality from angular#15064 and adds a live example.
Documents the functionality from angular#15064 and adds a live example.
Documents the functionality from #15064 and adds a live example.
…lar#15426) Documents the functionality from angular#15064 and adds a live example.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.