ExtJS 6 - on scrolling horizontal quickly, column header and data are not aligned properly

1.1k views Asked by At

I have tree panel, 2 locked columns, and rest are unlocked columns. I have large set of records. when I scroll horizontal quickly, column header and data are not in alignment. It works fine with few records.

1

There are 1 answers

0
Rishabh Shah On BEST ANSWER

I have got the answer. I am registering scroll event on view afterrender. On scrolling, I get the scroll x positions using t.scrollLeft and set it to headerCt's horizontal position of treeview.

afterrender: function () {
  var view = this.getView();                    
  view.getEl().on("scroll", function (e, t) {
  // On Horizontal scroll, set headerCt scroll x positions
  var headerCt = this.getViewForColumn().getHeaderCt();
  headerCt.setScrollX(t.scrollLeft);                                    
}