-
Notifications
You must be signed in to change notification settings - Fork 66
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
Reinitialize scrollbar on dynamically delete content #77
Comments
hi @abdelrhman92. I see event is missing in the readme. you should send const ev = new SlimScrollEvent({ type: 'recalculate' }); please let me know if it works. |
Nah, It's not working |
Please confirm this is the correct way to recalculate the scrollbar, because its not working, but strangely enough if i resize the window the scrollbar is recalculated. Could you look into it pelase. Thank you |
try wrapping into const ev = new SlimScrollEvent({ type: 'recalculate' });
setTimeout(() => this.scrollEvents.emit(ev)); |
@jkuri unfortunately its not working... not matter what the time out is none, 0 or 10sec.. i see that event is created but looks like the emitted event does nothing |
did you bind <div slimScroll [scrollEvents]="scrollEvents"></div> |
now i have and got another error but that is easly fixed,
should be this insted of otherwise you get this error
i can confirm now that the recalculate event is working properly, thx for the help |
no problem, glad you got it working. |
the slim scroll working fine when I am dynamically adding content. I mean the scrollbar keep getting smaller giving me the space for more scrolling to reveal more content. But It doesn't adjust when I remove content. Till it reach the minimum height then disappear. if is there any event should I emit when content change ??
The text was updated successfully, but these errors were encountered: