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

listheader sortDirection not working when template is used

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.6.1
    • Fix Version/s: 8.6.2
    • Component/s: Components, Databind 2
    • Security Level: Jimmy
    • Environment:

      Windows 10, Oracle JDK 1.8.0_201, Tomcat 8.0.47, ZK 8.6.1.FL.20190201

    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S1, ZK 8.6.2 S2

      Description

      When setting the sortDirection in a listheader and a template is in use, the icon is not shown.

      public class SortVM {
      	public class Resource {
      		private String code;
      		private String description;
      		public Resource(String code, String description) {
      			this.code = code;
      			this.description = description;
      		}
      		public String getCode() { return code; }
      		public String getDescription() { return description; }
      	}
      
      	public Resource[] getResources() {
      		return new Resource[] { new Resource("01", "ZZZ"), new Resource("02", "AAA") };
      	}
      }
      
      <listbox viewModel="@id('vm') @init('SortVM')" model="@load(vm.resources)">
      	<listhead>
      		<listheader label="Code" sort="auto(code)" sortDirection="ascending" />
      		<listheader label="Description" sort="auto(description)" />
      	</listhead>
      	<template name="model">
      		<listitem>
      			<listcell label="${each.code}" />
      			<listcell label="${each.description}" />
      		</listitem>
      	</template>
      </listbox>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rudyhuang rudyhuang
                Reporter:
                benedetti benedetti
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Time Spent - 2 hours Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - 2 hours Remaining Estimate - 6 hours
                  2h