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

a hidden column increases a row height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.5.0
    • Components
    • Security Level: Jimmy
    • None

      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

            CharlesQiu CharlesQiu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                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