1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-23 06:47:40 +01:00

fix: 🐛 Fix crash paginazione

This commit is contained in:
Maicol Battistini 2022-01-03 20:08:34 +01:00
parent bba6110b10
commit 8621a6aa88
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A

View File

@ -50,8 +50,8 @@ export default class DataTable extends Component {
.map((value: string) => Number.parseInt(value, 10));
}
let defaultRowsPerPage = this.attrs.get('default-rows-per-page');
if (Number.isInteger(defaultRowsPerPage)) {
let defaultRowsPerPage = this.attrs.get('default-rows-per-page', 10);
if (typeof defaultRowsPerPage === 'string' && Number.isInteger(defaultRowsPerPage)) {
defaultRowsPerPage = Number.parseInt(defaultRowsPerPage, 10);
if (!this.rowsPerPage.options.includes(defaultRowsPerPage)) {