Skip to content
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): support scrolling parent elements apart from list and viewport #18082

Merged

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 1, 2020

Currently for performance reasons we only support scrolling within the drop list itself or the viewport, however in some cases the scrollable container might be different.

Fixes #18072.
Relates to #13588.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release labels Jan 1, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 1, 2020
…d viewport

Currently for performance reasons we only support scrolling within the drop list itself or the viewport, however in some cases the scrollable container might be different. These changes add a new input that consumers can use to tell the CDK which other parents can be scrolled.

Fixes angular#18072.
Relates to angular#13588.
@crisbeto crisbeto force-pushed the 18072/drag-drop-scrollable-parents branch from e62fa20 to 4495b36 Compare January 11, 2020 11:57
@crisbeto
Copy link
Member Author

crisbeto commented Jan 11, 2020

I've reworked it to use cdkScrollable. Can you take another look @jelbourn?

Also one caveat is that people would have to remember to import the ScrollingModule for cdkScrollable to work which in turn brings in a bunch of other things like virtual scrolling. Would it make sense to have a dedicated module just for CdkScrollable that things like the DragDropModule can add to their exports?

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM for this change, though I think you're right that it would be better to have a module exclusively for CdkScrollable. I'll leave it up to you whether you want to do that in this PR or in a follow-up. We'll also want to do a follow-up for docs on this use of CdkScrollable

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jan 16, 2020
@crisbeto
Copy link
Member Author

I'll add the separate module in a different PR since it should be easier to land.

@jelbourn jelbourn merged commit c319431 into angular:master Jan 22, 2020
yifange pushed a commit to yifange/components that referenced this pull request Jan 30, 2020
…d viewport (angular#18082)

Currently for performance reasons we only support scrolling within the drop list itself or the viewport, however in some cases the scrollable container might be different. These changes add a new input that consumers can use to tell the CDK which other parents can be scrolled.

Fixes angular#18072.
Relates to angular#13588.
@angular-automatic-lock-bot
Copy link

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-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: minor This PR is targeted for the next minor release
Projects
None yet
4 participants