Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add an option to force sync scrolling.

  • Loading branch information...
commit 1f65255609ee7aee7885cdd2879de52d9eccb5d8 1 parent e4cbd4a
@mleibman authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 slick.grid.js
View
8 slick.grid.js
@@ -84,7 +84,8 @@ if (typeof Slick === "undefined") {
dataItemColumnValueExtractor: null,
fullWidthRows: false,
multiColumnSort: false,
- defaultFormatter: defaultFormatter
+ defaultFormatter: defaultFormatter,
+ forceSyncScrolling: false
};
var columnDefaults = {
@@ -1898,8 +1899,9 @@ if (typeof Slick === "undefined") {
if (Math.abs(lastRenderedScrollTop - scrollTop) > 20 ||
Math.abs(lastRenderedScrollLeft - scrollLeft) > 20) {
- if (Math.abs(lastRenderedScrollTop - scrollTop) < viewportH &&
- Math.abs(lastRenderedScrollLeft - scrollLeft) < viewportW) {
+ if (options.forceSyncScrolling || (
+ Math.abs(lastRenderedScrollTop - scrollTop) < viewportH &&
+ Math.abs(lastRenderedScrollLeft - scrollLeft) < viewportW)) {
render();
} else {
h_render = setTimeout(render, 50);
Please sign in to comment.
Something went wrong with that request. Please try again.