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

ListModelList clear cause listbox to not add new listitems

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.5.1, 9.5.1.3, 9.6.0
    • Fix Version/s: 9.6.0
    • Component/s: Components
    • Security Level: Jimmy

      Description

      Steps to Reproduce

      https://zkfiddle.org/sample/2crdgfr/2-Another-new-ZK-fiddle

      Open drop down, select an value

      Current Result

      Drop down is empty after update

      Expected Result

      Drop down contains "beep" "bop" after update 

      Debug Information

      Seem to happen after:

      https://github.com/zkoss/zk/commit/af6698a368b236824b70da2e6c237d9932378361#diff-45450f3948e27c39e03b7c9692a231a21a7c9397ad15faf3f10858bb7d337497R188

      Workaround

      create a new ListModelList instead of using clear(), and use notifyChange to replace the listmodel in the view.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Time Spent - 1 hour, 30 minutes Remaining Estimate - 2 hours, 30 minutes
                  2h 30m
                  Logged:
                  Time Spent - 1 hour, 30 minutes Remaining Estimate - 2 hours, 30 minutes
                  1h 30m