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

dynamically added nested borderlayout triggers onBind twice

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.0
    • Fix Version/s: 8.5.2
    • Component/s: Components
    • Security Level: Jimmy
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1

      Description

      Steps to Reproduce

      run the attached example
      click the button (observe the logs in the browser console)

      Current Result

      "onBind" is called 2 times every time the nested added dynamically
      "onUnbind" is only called once

      Expected Result

      "onBind" called only once
      (or if technically necessary to call onBind 2x, call onUnbind also 2x)

      Unmatched onBind/onUnbind pairs make it difficult to initialize/cleanup client side libraries properly.
      The performance overhead of rendering the inner borderlayout 2x should be avoided.

      Workaround

      Surrounding the inner <borderlayout> with a <div> fixes the problem, and onBind gets only called once as expected

        Activity

        Hide
        JamesChu JamesChu added a comment -

        Fixed since 2018/06/01

        Show
        JamesChu JamesChu added a comment - Fixed since 2018/06/01

          People

          • Assignee:
            klyvechen klyvechen
            Reporter:
            cor3000 cor3000
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 days
              2d
              Remaining:
              Remaining Estimate - 2 days
              2d
              Logged:
              Time Spent - Not Specified
              Not Specified

                Agile