-
-
Notifications
You must be signed in to change notification settings - Fork 98
Updated event
Murhaf Sousli edited this page Oct 12, 2023
·
3 revisions
The NgScrollbar
component has an output (updated)
which emits when:
- After its view is initialized
- Setting new options (_e.g. an input is changed)
- Resize sensor emitted (e.g. the content size is changed)
Example: Check when content becomes scrollable
<ng-scrollbar #scrollbar="ngScrollbar" (updated)="onScrollbarUpdate(scrollbar.state)"></ng-scrollbar>
onScrollbarUpdated(state: NgScrollbarState) {
if (state.isVerticallyScrollable) {
console.log('Scrollable');
} else {
console.log('Not Scrollable');
}
}
Here is a demo stacbklitz
Become a sponsor and get your logo on our README on GitHub and the front page of https://ngx-scrollbar.netlify.com/.
Become a backer and get your logo on our README on GitHub.
Latest version (v15)
Addons:
Older version (v13)
- Demo for v13
- Usage
- Styling
- Global Options
- Pointer Events
- Scroll Event
- Updated Event
- Smooth Scroll Functions
- Performance tweak
- Integration
- Reached events