MicroDroid / vue-materialize-datatable

A fancy Materialize CSS datatable VueJS component.
https://overcoder.dev/vue-materialize-datatable
MIT License
179 stars 67 forks source link

If Paginate set to false, printing raise an error : "TypeError: can't access property "remove", clonedTable.querySelector(...) is null" #68

Open tpoussard opened 3 years ago

tpoussard commented 3 years ago

When paginate is set to false, the table footer containing pagination controls is removed. Then, when printing the table from the table button, a null null error is raised : "TypeError: can't access property "remove", clonedTable.querySelector(...) is null" and : "TypeError: can't access property "remove", clonedTable.querySelector(...) is null -> print DataTable.vue:345" When checking the code line 345, I noticed a query selector targeting the non-existing HTML element '.material-pagination' in the footer and the method .remove being applied, which cause the error. To reproduce the bug, you just need to take the basic example, set paginate to false in the template, then try to print.