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

Chosenbox - remove interval doesn't remove the last selection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.1
    • 8.6.0
    • None
    • None
    • None

      Steps to Reproduce

      <zk>
          <zscript><![CDATA[
              ListModel model = new ListModelList();
              model.add("adam");
              model.add("bbb");
              model.add("item0");
              model.add("item1");
              model.add("item2");
              model.add("item3");
              model.add("item4");
              model.add("item5");
              model.multiple = true;
              model.addToSelection("item1");
              model.addToSelection("item3");
      
              long id = 2;
      
              void update(Timer comp) {
                  model.removeRange((int) id, (int) id + 2);
                  if (model.size() == 2) {
                      comp.stop();
                  }
                  return;
              }
      
          ]]></zscript>
          <div apply="org.zkoss.bind.BindComposer">
              <vlayout>
                  <chosenbox model="@bind(model)" width="80%" creatable="true"/>
                  <timer id="timer" repeats="true" delay="3000" onTimer="update(self)"/>
              </vlayout>
          </div>
      </zk>
      

      Current Result

      `item3` is not removed after 6 secs.

      Expected Result

      `item3` should also be removed.

            wenninghsu wenninghsu
            wenninghsu wenninghsu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: