I have DataTable with resizable columns and resizeMode set to "expand".
When I hide some columns, the remains one becomes wider to fit table's width.
Is this expected behavior with resizeMode="expand"?
How to reproduce:
XHTML:
Code: Select all
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>PrimeFaces Test</title>
</h:head>
<h:body>
<p:commandButton id="toggler" value="Toggler" />
<p:columnToggler trigger="toggler" datasource="tbl" />
<p:dataTable id="tbl" resizableColumns="true" resizeMode="expand">
<p:column headerText="Column 1" />
<p:column headerText="Column 2" />
<p:column headerText="Column 3" />
<p:column headerText="Column 4" />
<p:column headerText="Column 5" />
<p:column headerText="Column 6" />
</p:dataTable>
</h:body>
</html>