From b0e7706ee4b011f34b382bbb38826ee711b5889f Mon Sep 17 00:00:00 2001 From: "Ghislain B." Date: Thu, 22 Aug 2024 23:28:20 -0400 Subject: [PATCH] perf: decrease virtual scroll render throttling to 5ms (#1049) --- src/models/gridOption.interface.ts | 2 +- src/slick.grid.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/gridOption.interface.ts b/src/models/gridOption.interface.ts index ee3b1962..fa171718 100644 --- a/src/models/gridOption.interface.ts +++ b/src/models/gridOption.interface.ts @@ -285,7 +285,7 @@ export interface GridOption { /** Optional sanitizer function to use for sanitizing data to avoid XSS attacks */ sanitizer?: (dirtyHtml: string) => string; - /** Defaults to 50, render throttling when scrolling large dataset */ + /** Defaults to 5(ms), render throttling when using virtual scroll on large dataset */ scrollRenderThrottling?: number; /** CSS class name used when cell is selected */ diff --git a/src/slick.grid.ts b/src/slick.grid.ts index e8442514..ff863576 100644 --- a/src/slick.grid.ts +++ b/src/slick.grid.ts @@ -287,7 +287,7 @@ export class SlickGrid = Column, O e doPaging: true, autosizeColsMode: GridAutosizeColsMode.LegacyOff, autosizeColPaddingPx: 4, - scrollRenderThrottling: 50, + scrollRenderThrottling: 5, autosizeTextAvgToMWidthRatio: 0.75, viewportSwitchToScrollModeWidthPercent: undefined, viewportMinWidthPx: undefined,