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

a hidden column increases a row height

    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
    • Labels:
      None

      Description

      Steps to Reproduce

      1. run the code below
        	<grid width="602px">
        		<columns menupopup="auto">
        			<column width="200px" label="Col 1"/>
        			<column width="200px" label="Col 2"/>
        			<column width="200px" label="Col 3" visible="false"/>
        		</columns>
        		<rows>
        			<row>
        				<label value="AAA"/>
        				<label value="BBB"/>
        				<label value="CCC"/>
        			</row>
        			<row>
        				<label value="AAA"/>
        				<label value="BBB BBB"/>
        				<label value="CCC CCC CCC"/>
        			</row>
        			<row>
        				<label value="AAA"/>
        				<label value="BBB BBB BBB"/>
        				<cell>
        				<label value="CCC CCC CCC CCC CCC"/>
        				</cell>
        			</row>
        		</rows>
        	</grid>
        

      Current Result

      the 3rd row becomes higher than a normal one

      Expected Result

      all row heights keep unchanged

      Debug Information

      • caused by wrapped texts
      • ZK-3748 doesn't fix this case
      • suggest applying a CSS declaration instead of a inline style on elements
        current:
        <td id="z_i-chdextr" style="text-overflow: ellipsis;white-space: nowrap;" class="z-row-inner">...</td>
        

        suggested:

        <td id="z_i-chdextr" class="z-row-inner z-row-hidden-column">...</td>
        

      workaround

      • use <if> to make a column invisible
      • apply white-space: nowrap; on a hidden column
      • .z-grid .z-row-content { white-space: nowrap; /* overflow: auto; optional, depends on your design */ }
      • apply attached js patch
      1. zk-3850.js
        2 kB
        hawk
      1. higherRow.png
        22 kB

        Issue Links

          Activity

          Hide
          JamesChu JamesChu added a comment -

          Fixed since 2018/04/24

          Show
          JamesChu JamesChu added a comment - Fixed since 2018/04/24

            People

            • Assignee:
              CharlesQiu CharlesQiu
              Reporter:
              hawk hawk
            • 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:
                Time Spent - 4 hours Remaining Estimate - 1 day, 4 hours
                1d 4h
                Logged:
                Time Spent - 4 hours Remaining Estimate - 1 day, 4 hours
                4h