In 2.2.M1 dataTables wider than the browser window are not rendered correctly, the header and the footer does not extend to match the width of the table. Screenshot: http://imagebin.org/114022
A possible but ugly workaround is to set the width of the header and footer using jQuery, and add div.ui-datatable{overflow: auto} to your CSS declarations.
Code: Select all
<script type="text/javascript">
//<![CDATA[
jQuery(window).load( function() {
var datatableWidth = jQuery('div.ui-datatable > table').width();
jQuery('div.ui-datatable > div.ui-datatable-header').width(datatableWidth - 22);
jQuery('div.ui-datatable > div.ui-paginator').width(datatableWidth - 6);
});
//]]>
</script>
In the next version of PrimeFaces it would be better to put the header in thead and the footer in tfoot instead of using separate divs.