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

Nested dynamic Drawers - DOM not cleaned up

XMLWordPrintable

    • ZK 9.5.0 S1
    • None

      Steps to Reproduce

      <zk>
          <button label="replace drawer contents" onClick="
              drawer.getChildren().clear();
              Div div = new Div();
              div.appendChild(new Drawer());
              div.appendChild(new Drawer());
              drawer.appendChild(div);
          "/>
          <drawer id="drawer" />
      </zk>
      

      click the button (multiple times) to render/replace the contents of the drawer

      Current Result

      after the first click the second drawer doesn't look like it's nested inside the div:

      after subsequent clicks this results in non cleaned up DOM elements, duplication of UUIDs

      Causing JS errors in places where UUID matter i.e. everywhere in ZK widgets.

      Expected Result

      components nested in the correct parent DOM element
      reliable DOM element cleanup no duplicate DOM ids

      Debug Information

      Workaround

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 3 hours Remaining Estimate - 5 hours
                5h
                Logged:
                Time Spent - 3 hours Remaining Estimate - 5 hours
                3h