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

Fix onTableLength assigning currentPerPage as string #33

Closed SafAlhaji closed 6 years ago

SafAlhaji commented 6 years ago

When changing the number of rows per page, the currentPerPage property gets assigned to a string, and not a number. This results in not viewing all rows when choosing "All", as the identity (triple equality, w/e) operator in the following line will return false:

paginatedRows = paginatedRows.slice((this.currentPage - 1) * this.currentPerPage, this.currentPerPage === -1 ? paginatedRows.length + 1 : this.currentPage * this.currentPerPage);
thepill commented 6 years ago

thanks @SafAlhaji