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

listitem.setParent loses selected flag

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.4
    • Fix Version/s: 7.0.5
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:

      Description

      the fiddle example shows that adding a selected item to a listbox, works for appendChild and insertBefore but not when using listitem.setParent()
      http://zkfiddle.org/sample/ij4ufp/1-listbox-add-selected-listitem (need to clear the selection before each insert, to see that setParent has no effect)

      enabling multiple selections makes this more apparent. no need to clear the selection here, just append/insert/setParent items and see that setParent "initally" has no effect and only updates when another item is added.
      http://zkfiddle.org/sample/ij4ufp/2-listbox-add-selected-listitem

      Workaround

      use appendChild() and insertBefore()

        Attachments

          Activity

            People

            • Assignee:
              ChunfuChang ChunfuChang
              Reporter:
              cor3000 cor3000
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: