-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug(mat-timepicker): 1 min interval click handler slow warning #30539
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
Comments
It's because it needs to generate 1440 options which can take a while. I'd recommend setting a min and max so users don't have to scroll many options. Closing since it's working as expected. |
I disagree with this resolution. Limiting the selection range would restrict applications that require a full 24-hour time span. Instead, I would expect a more efficient solution, such as implementing virtual scrolling within the time picker’s selection list to avoid rendering all 1440 options at once. |
I've updated #10122 to track adding virtual scrolling. |
A possible alternative solution would be implementing two selection lists: One for selecting the hour (0-23). For reference, see the official documentation: |
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. |
Is this a regression?
The previous version in which this bug was not present was
No response
Description
When I create a timepicker with an interval of 1 min a violation warning occurs
warning:
[Violation] 'click' handler took 445ms
Reproduction
StackBlitz link: https://stackblitz.com/edit/zznk2yuz?file=src%2Fexample%2Ftimepicker-overview-example.html
Steps to reproduce:
Expected Behavior
opens instantly
Actual Behavior
opens in ~500ms
Environment
The text was updated successfully, but these errors were encountered: