You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug calculateWidthDependantElements causes a considerable slowdown. This is mostly due to the fact that it is called in ngDoCheck.
This computation is used to determine if buttons should be visible or collapsed into a collapsable dropdown.
The components that depend on this computation can be found in the following screenshots.
Screenshots
Solution
Instead of performing this calculation on ngDoCheck (which is run on every Angular re-render) it should be done whenever a resize of relevent elements occur. The relevant element being the container element in which the buttons are situated.
castaway
changed the title
calculateWidthDependantElements function is called too often
calculateWidthDependentElements function is called too often
Jan 29, 2025
Describe the bug
calculateWidthDependantElements
causes a considerable slowdown. This is mostly due to the fact that it is called inngDoCheck
.This computation is used to determine if buttons should be visible or collapsed into a collapsable dropdown.
The components that depend on this computation can be found in the following screenshots.
Screenshots

Solution
Instead of performing this calculation on ngDoCheck (which is run on every Angular re-render) it should be done whenever a resize of relevent elements occur. The relevant element being the container element in which the buttons are situated.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: