-
Notifications
You must be signed in to change notification settings - Fork 159
refactor(grid): Removed scroll throttle for grid scrolls #16871
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,6 @@ import { | |
| ViewContainerRef, | ||
| DOCUMENT, | ||
| inject, | ||
| InjectionToken | ||
| } from '@angular/core'; | ||
| import { | ||
| areEqualArrays, | ||
|
|
@@ -112,15 +111,6 @@ import { CharSeparatedValueData, DropPosition, FilterMode, getUUID, GridCellMerg | |
| import { getCurrentI18n, getNumberFormatter, IResourceChangeEventArgs, } from 'igniteui-i18n-core'; | ||
| import { I18N_FORMATTER } from 'igniteui-angular/core'; | ||
|
|
||
| /** | ||
| * Injection token for setting the throttle time used in grid virtual scroll. | ||
| * @hidden | ||
| */ | ||
| export const SCROLL_THROTTLE_TIME = /*@__PURE__*/new InjectionToken<number>('SCROLL_THROTTLE_TIME', { | ||
| factory: () => 40 | ||
| }); | ||
|
|
||
|
|
||
| interface IMatchInfoCache { | ||
| row: any; | ||
| index: number; | ||
|
|
@@ -177,7 +167,6 @@ export abstract class IgxGridBaseDirective implements GridType, | |
| protected _diTransactions = inject(IgxGridTransaction, { optional: true }); | ||
| /** @hidden @internal */ | ||
| public i18nFormatter = inject(I18N_FORMATTER); | ||
| private readonly THROTTLE_TIME = inject(SCROLL_THROTTLE_TIME); | ||
|
|
||
| /** | ||
| * Gets/Sets the display time for the row adding snackbar notification. | ||
|
|
@@ -3731,7 +3720,6 @@ export abstract class IgxGridBaseDirective implements GridType, | |
|
|
||
| this.scrollNotify.pipe( | ||
| filter(() => !this._init), | ||
| throttleTime(this.THROTTLE_TIME, animationFrameScheduler, { leading: false, trailing: true }), | ||
| destructor | ||
| ) | ||
| .subscribe((event) => { | ||
|
Comment on lines
3721
to
3725
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the exported
SCROLL_THROTTLE_TIMEtoken is a breaking change for any consumers (including internal tooling) that configured grid scroll behavior via DI. Consider keeping the token for backwards compatibility (e.g., deprecated), or reintroducing an equivalent public/hidden configuration point so existing DI configurations don’t hard-break at compile time.