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(cdk/scrolling): Scroll functions silently fail if the viewport is not yet fully initialized #23716

Open
jzabinski-dolios opened this issue Oct 8, 2021 · 2 comments
Labels
area: cdk/scrolling feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@jzabinski-dolios
Copy link

Feature Description

cdk-virtual-scroll-viewport's scrollTo... functions (like scrollToIndex) silently fail when the viewport is not yet initialized. Technically the functions are doing nothing wrong from a code standpoint, but since the component is not yet fully initialized, it is empty, so trying to scroll will do nothing meaningful. Sending back an error (or at least logging a warning to the console) if an empty viewport is scrolled would be helpful so that developers know that something went wrong.

This would be mitigated if we had an async option that managed the timing of scroll commands. See this feature request.

Use Case

This would improve every use case of the virtual scroller.

@jzabinski-dolios jzabinski-dolios added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Oct 8, 2021
@mmalerba mmalerba added P4 A relatively minor issue that is not relevant to core functions and removed needs triage This issue needs to be triaged by the team labels Jan 7, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Mar 14, 2022

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

@angular-robot
Copy link
Contributor

angular-robot bot commented Apr 3, 2022

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/scrolling feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

4 participants