v16.0.0
What's Changed
- feat:
scrollViewportdirective can be a descent child, not necessarily a direct child of<ng-scrollbar externalViewport>. - feat: Add
start,end,right,bottomandcenteroptions toscrollToElement(supports RTL), closes #637. - feat: Add
syncSpacerdirective that is applied on<ng-scrollbar externalViewport>component to sync spacer element with content dimension changes. - fix:
ResizeObserverloop completed with undelivered notifications, closes #650. - enhance: Improve scrollbar rendering speed that uses
externalViewportsuch as integrating with 3rd party library. - enhance: Use the shared resize observer from the CDK to do the necessary calculation.
- enhance:
asyncDetectionUse the content observer service from the CDK to detect viewport and content wrapper elements. - enhance: use
--scrollbar-thumb-hover-colornot only when hovered but also when active. - enhance:
trackandthumbcontrols uses more accurate measures usinggetBoundingClientRectinstead of direct size properties. - refactor: Switch to
InputSignalinstead of standards inputs across components. - refactor: Use effects instead of
ngOnInitto initialize the scrollbar component. - refactor: Remove
scrollViewportdirective fromng-scrollbarhostDirectives because it's redundant. - refactor: the
TrackAdapternow uses viewport & content dimension signals to update the track size instead ofResizeObserverevents.
Breaking changes
- Minimum compatibility is Angular v17.3.0
- The directive
cdkVirtualScrollViewportno longer acceptsautovalue, instead usesyncSpacer- Before
<ng-scrollbar externalViewport cdkVirtualScrollViewport="auto"> - After
<ng-scrollbar externalViewport cdkVirtualScrollViewport syncSpacer>
- Before
Full Changelog: v15.1.3...v16.0.0