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

Unnecessary multiple _hliteOpt function callings in Chosenbox when filtering item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.6.0
    • Component/s: None
    • Labels:
      None

      Description

      Steps to Reproduce

      Run the following zul.

      <zk>
      	<script><![CDATA[
      		zk.afterMount(function() {
      			var _xChosenbox = {};
      			zk.override(zkmax.inp.Chosenbox.prototype, _xChosenbox, {
      				_hliteOpt: function (target, highlight) {
      					_xChosenbox._hliteOpt.apply(this, arguments);
      					zk.log('<_hliteOpt>' + (target ? target.id : 'no target') + ', highlight: ' + highlight);
      				}
      			});
      		});
      	]]></script>
      	<zscript><![CDATA[
              ListModelList model = new ListModelList(new String[] {
                  "aaa1", "aaa2", "aaa3", "bbb4", "bbb5", "bbb6", "ccc7", "ccc8", "ccc9"});
          ]]></zscript>
      	<chosenbox width="500px" model="${model}"/>
      </zk>
      

      type b to filter, and press arrow up/down.

      Current Result

      lots of _hliteOpt function callings

      Expected Result

      only one _hliteOpt function call

      Debug Information


      Workaround


        Attachments

          Activity

            People

            Assignee:
            DevChu DevChu
            Reporter:
            DevChu DevChu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: