Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3921

ROD grid loses scroll position when hiding/showing columns

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.1.2
    • Fix Version/s: 8.5.2
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1

      Description

      Steps to Reproduce

      open rod-grid-column-scroll-pos.zul
      scroll down until ROD loads new rows
      hide a column (using the column menu popup, or the debug buttons below the grid)

      Current Result

      scroll position changes to an incorrect position

      Expected Result

      scroll position should be preserved

      Debug Info

      after showing/hiding a column the scroll paddings tpad/bpad are reset to a 0 height.

      Workaround

      init the grid's scroll-paddings when changing the column visibility
      (causes a short flickering in FF, edge - chrome looks stable)

      	zk.afterLoad('zul.grid', function() {
      		var xColumn = {};
      		zk.override(zul.grid.Column.prototype, xColumn, {
      			setVisible : function() {
      				var result = xColumn.setVisible.apply(this, arguments);
      				setTimeout(() => this.getGrid()._initPadSizes(), 0);
      				return result;
      			}
      		});//zk.override
      	});//zk.afterLoad
      

        Activity

        Hide
        cor3000 cor3000 added a comment - - edited

        same problem happens when calling append/removeChild on columns

        Show
        cor3000 cor3000 added a comment - - edited same problem happens when calling append/removeChild on columns
        Hide
        Anonymous added a comment -

        Fixed since 2018/06/13

        Show
        Anonymous added a comment - Fixed since 2018/06/13
        Hide
        Anonymous added a comment -

        Fixed since 2018/06/28

        Show
        Anonymous added a comment - Fixed since 2018/06/28

          People

          • Assignee:
            CharlesQiu CharlesQiu
            Reporter:
            cor3000 cor3000
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Time Spent - 7 hours Remaining Estimate - 1 hour
              1h
              Logged:
              Time Spent - 7 hours Remaining Estimate - 1 hour
              7h

                Agile