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

Tree's content is hidden by default when there is no Treecol element

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 9.0.1.2
    • 8.6.3
    • Components
    • None

      Steps to Reproduce

      After upgrading from 8.6.0.1 to 8.6.3 version we noticed problems with one of our components which renders Tree. The tree was rendered but it was hidden by default.
      https://zkfiddle.org/sample/15f30h9/1/v8.6.3-Another-new-ZK-fiddle

      Current Result

      http://zkfiddle.org/direct/15f30h9/1/v8.6.3-Another-new-ZK-fiddle?run=1eg2d15 -> 8.6.3 version, the same code as above, but Tree is not visible.
       

      Expected Result

      the tree is visible
       

      Debug Information

      • The problem is with _afterCalcSize function in zul.mesh.wpd file. It adds "visibility:hidden" style. After some investigation, it seems that it occurs only when Treecols element has no children. It previous version it worked fine.

      Here are some fiddles:

       Workaround

      1. remove the no-children Treecols
      2. add 2 Treecol without any label

      <window title="tree demo" border="normal" width="400px" >
          <tree id="tree" rows="5">
      <!-- remove this no-children component
              <treecols sizable="true">
              </treecols>
      -->
              <treechildren>
                  <treeitem>
                      <treerow>
                          <treecell label="Item 1" />
                          <treecell label="Item 1 description" />
                      </treerow>
                  </treeitem>
                  <treeitem>
                      <treerow>
                          <treecell label="Item 2" />
                          <treecell label="Item 2 description" />
                      </treerow>
                      <treechildren>
                          <treeitem>
                              <treerow>
                                  <treecell label="Item 2.1" />
                              </treerow>
                          </treeitem>
                          <treeitem>
                              <treerow>
                                  <treecell label="Item 2.2" />
                                  <treecell
                                      label="Item 2.2 is something who cares" />
                              </treerow>
                          </treeitem>
                      </treechildren>
                  </treeitem>
                  <treeitem label="Item 3" />
              </treechildren>
              <treefoot>
                  <treefooter label="Count" />
                  <treefooter label="Summary" />
              </treefoot>
          </tree>
      </window>
      

            Unassigned Unassigned
            mstobinski mstobinski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: