ngx-scrollbar
ngx-scrollbar copied to clipboard
Scrollbar-thumb width doesn`t recalculate after change of --scrollbar-padding
Reproduction
It can be reproduced on demo page https://ngx-scrollbar.netlify.app/
Steps to reproduce:
- Open Styling options
- Change --scrollbar-padding value
Expected Behavior
Scrollbar-thumb width recalculated
Actual Behavior
Scrollbar-thumb width stays them same and recalculates only after scroll event or resize event
Environment
- Angular: 16.1.5
- ngx-scrollbar: 13.0.2
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
Is there a practical use case where you want to change the padding at runtime?
In my case i have a table with horizontal scroll, it stays fixed at the bottom of page and takes whole page, but if i scroll to the end of the table it become absolute and i need to shrink it a bit so it fits in the layout
when it stops at the bottom i change --scrollbar-padding value
Sorry, it is unclear to me, what happens when you scroll to the end? I cannot see an issue with the screenshot provided!
Can you explain what are you trying to accomplish?
Ok, what i want to accomplish is to dynamicly change width of scrollbar, problem is that it stays the same after i change --scrollbar-padding, and when i start scrolling it recalculates and scrollbar-thumb jumps to the side, than jumps back it looks glitchy. I tried to use update() method, but it didn`t help
Do you mean you want to dynamically change the scrollbar thickness? because if you are using the horizontal scrollbar, the width is the calculated length while the thickness is not calculated.
But anyway, I understand that you want the scrollbar to update when you change the --scrollbar-padding right?
But anyway, I understand that you want the scrollbar to update when you change the --scrollbar-padding right?
Yep, that`s what i need
This should be fixed in v14
Thank you very much