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

tree JS error when replacing treecols

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 9.5.1.3, 9.6.0.1
    • Fix Version/s: 9.6.1
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:

      Description

      Steps to Reproduce

      run the code

      <zk>
          <button label="replace treecols"
                  onClick='
                  Treecols tco = tr.getTreecols();
                  tco.detach();
                  tr.appendChild(tco);
          '/>
          <tree id="tr" hflex="min">
              <treecols>
                  <treecol label="col-1"/>
                  <treecol label="col-2"/>
              </treecols>
          </tree>
      </zk>
      

      click the button

      Current Result

      zk.wpd:316 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'textContent')
          at zjq.textWidth (zk.wpd:316)
          at c.getContentWidth_ (zul.mesh.wpd:111)
          at c._calcMinWds (zul.mesh.wpd:47)
          at m (zul.mesh.wpd:10)
          at c.beforeMinFlex_ (zul.mesh.wpd:43)
          at Object.fixMinFlex (zk.wpd:705)
          at c.onFitSize (zk.wpd:704)
          at x (zk.wpd:343)
          at y (zk.wpd:343)
          at Object.fireDown (zk.wpd:346)
      

      Expected Result

      no error, just replace the treecols child component of a tree

      Debug Information

      happens in combination with hflex="min" on the tree

      Workaround

      invalidate the whole tree

        Attachments

          Activity

            People

            Assignee:
            jumperchen jumperchen
            Reporter:
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: