I'm using angular material version 9.2.4 and created a data table with pagination. I want my users to be able to print this table, I already removed every unnecessary element from the page with @media print, but the table's behavior is weird. I want my table rows to break to a new page if it cannot fit the page because of the number of rows, but it just skips the remaining data.
What I've tried so far:
Adding this to my css:
table { page-break-inside: auto; } tr { page-break-inside: avoid; page-break-after: auto; display: inline-block; } thead { display: table-header-group; } tfoot { display: table-footer-group; }Wrapping all table elements inside div, because I've read that the above CSS properties can ignore non-block-displayed elements.
$(document).ready(function(){$("table tbody th, table tbody td").wrapInner("<div></div>");});
Any other ideas?