Skip to content
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

Re-render grid when expanding group #958

Open
rajdsouza opened this issue Jun 13, 2014 · 0 comments
Open

Re-render grid when expanding group #958

rajdsouza opened this issue Jun 13, 2014 · 0 comments

Comments

@rajdsouza
Copy link

In slick.groupitemmetadataprovider.js

add this.resizeCanvas() as it helps to re-render the grid when a grid is initiated in collapse mode

function handleGridClick(e, args) {
      var item = this.getDataItem(args.row);
      if (item && item instanceof Slick.Group && $(e.target).hasClass(options.toggleCssClass)) {
        var range = _grid.getRenderedRange();
        this.getData().setRefreshHints({
          ignoreDiffsBefore: range.top,
          ignoreDiffsAfter: range.bottom + 1
        }); //take diff till range.bottom , and ignore it after.

        if (item.collapsed) {
          this.getData().expandGroup(item.groupingKey);
        } else {
          this.getData().collapseGroup(item.groupingKey);
        }
        this.resizeCanvas();
        e.stopImmediatePropagation();
        e.preventDefault();
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant