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

Header sort icon not cleared on model change

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.2.1
    • Fix Version/s: 8.6.1
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      Run fiddle
      http://zkfiddle.org/sample/1aq7fhr/2-grid-sort-style-not-cleared-on-model-change

      click the update model button to load rows.
      click the "click me " header to sort the rows
      click the update model button to reload rows

      Current Result

      After reloading the model, rows are using the natural sorting direction.
      However, the header still displays the last known sorting direction arrow (asc / desc)

      Expected Result

      direction arrow should be cleared on model change

      Debug Info

      Root Cause

      Workaround

      Extend grid such as:

      public class GridEx extends Grid {
      	@Override
      	public void setModel(ListModel<?> model) {
      		super.setModel(model);
      		for (Component column: this.getColumns().getChildren()) {
      			((Column)column).setSortDirection("natural");
      		}
      	}
      }
      

      and declare extended grid in zul or lang-addon

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                CharlesQiu CharlesQiu
                Reporter:
                MDuchemin MDuchemin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h