-
Notifications
You must be signed in to change notification settings - Fork 426
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
feat: add enableMouseWheelScrollHandler option to allow dynamic load #555
Conversation
ghiscoding
commented
Nov 25, 2020
- when using TypeScript, we must always import the mousewheel jquery lib even if we don't need it because TypeScript does not yet support dynamic import. So providing a grid option to only use the mousewheel handler when we really want it is the only bulletproof way to only use that handler only when we really need it (typically when using a frozen grid)
- ref Angular-Slickgrid issue
- when using TypeScript, we must always import the mousewheel jquery lib even if we don't need it because TypeScript does not yet support dynamic import. So providing a grid option to only use the mousewheel handler when we really want it is the only bulletproof way to only use that handler only when we really need it (typically when using a frozen grid) - ref Angular-Slickgrid [issue](ghiscoding/Angular-Slickgrid#618)
I get the first change, but what was the second one around the $viewport events even doing? Looks like some kind of workaround. |
You mean this code In the code that I added, it basically does the following:
This avoids adding multiple event listeners for the same handler, which could be really bad and slow down the entire grid. You might be wondering why am I doing that anyway? Because in my lib, we can add a freeze column at any point in time (see animated gif) and for that I use |
OK, nice! |
And you'll be wanting a release? |
that would be nice too 😃 |
- this enables the use of the mousewheel scrolling event handler and that makes the mousewheel scroll to work from anywhere in the grid - implement a permanent fix for issue #618 to replace temp fix made in PR #619 - requires the core lib [PR #555](6pac/SlickGrid#555) to be merged and released
- this enables the use of the mousewheel scrolling event handler and that makes the mousewheel scroll to work from anywhere in the grid - implement a permanent fix for issue #618 to replace temp fix made in PR #619 - requires the core lib [PR #555](6pac/SlickGrid#555) to be merged and released