primefaces-extensions: Layout: dataTable with percentage scrollHeight is wrongly sized

Describe the bug dataTable with scrollHeight=“100%” calculates its actual height wrong, resulting in overflow with no scrollbar and other problems of this nature.

Reproducer primefaces-extensions-layout-datatable-scroll-height.zip

Environment:

  • PF+PFE Version: 6.2.30+6.2.10, 10.0.0+10.0.6, 11.0.0-SNAPSHOT+10.0.6
  • JSF + version: __
  • Affected browsers: Firefox, Chrome

To Reproduce Steps to reproduce the behavior:

  1. Open non-maximized browser window.
  2. Go to http://localhost:8080/primefaces-test/
  3. See only some rows visible out of 25. See no scrollbar. image
  4. Resize the window by dragging. See scrollbar appear. image
  5. Maximize the window. See wrong table height again. image

Expected behavior dataTable should be correctly sized and with a proper scrollbar.

Sample XHTML

<h:body style="width: 100%;">
	<pe:layout>
		<pe:layoutPane position="north" resizable="false" size="200" />
		<pe:layoutPane position="center" resizable="false" styleContent="overflow:hidden;">
			<p:dataTable value="#{[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}" var="row" scrollable="true" scrollHeight="100%" style="height: 100%">
				<p:column>
					row #{row}
				</p:column>
			</p:dataTable>
		</pe:layoutPane>
		<pe:layoutPane position="south" resizable="false" size="200" />
	</pe:layout>
</h:body>

Sample Bean None.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (12 by maintainers)

Commits related to this issue

Most upvoted comments

OK this will be in 10.0.7 and 11.0.0! Thanks for the PR!