Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix visual jitter in
Combobox
component when using native scrollbar (…
…#3190) * Avoid `scrollToIndex` when using native scrollbar in `ComboBox` * format comment * set `ActivationTrigger` in mousedown If you use the scrollbar, a `mousedown` and `pointerdown` event is fired before you start interacting with the scrollbar. If you use the `scroll` event, then the callback is fired while scrolling. To improve performance a bit more, we will set the activation trigger in the `mousedown` event because we only need to set it once. If you are done scrolling, we don't reset it (we didn't do that before either), but instead we rely on other events to override the trigger (e.g.: you start using the keyboard). The big benefit is that this now only calls the `setActivationTrigger` once, instead of `n` times with the same value. * optimize `onWheel` to only trigger once This is a similar performance trick as before. We only need to set the activationTrigger once, so there is no need to keep calling this function for no reason. * update changelog --------- Co-authored-by: Robin Malfait <[email protected]>
- Loading branch information