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

Listbox supports listgroup like optgroup in select mold

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 8.6.0
    • 7.0.5
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.6.0 S1, ZK 8.6.0 S2

      In affects version, Listbox will throw “Unsupported Listgroup in Select mold!” if we use a Listgroup in the "select" mold.
      But ZK doesn't have a corresponding component like <optgroup> and <select> (http://www.w3schools.com/tags/tag_optgroup.asp)

      Workaround

      	<combobox model="@load(vm.itemList) @template(each.group?'group':'item')" readonly="true" 
      	selectedIndex="@bind(vm.selectedIndex)" selectedItem="@bind(vm.selectedItem)">
      		<template name="group">
      		<comboitem label="@load(each)" style="font-weight:bold" disabled="true"/>
      		</template>
      		<template name="item">
      		<comboitem label="@load(each)" />
      		</template>
      	</combobox>
      

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 30 minutes
                1d 1h 30m