Commits (2)
......@@ -211,7 +211,8 @@
if (typeof this.config.filterMethod === 'function') {
return this.config.filterMethod(rows, terms, cols, cellValue)
}
const lowerTerms = terms ? terms.toLowerCase() : ''
if (!terms || !terms.length) return rows
const lowerTerms = terms.toLowerCase()
return rows.filter(
row => cols.some(col => (cellValue(col, row) + '').toLowerCase().indexOf(lowerTerms) !== -1)
)
......@@ -227,7 +228,9 @@
this.updateConfig()
this.filter = localStorage.getItem(this.filterKey) || this.filter
try {
this.pagination = JSON.parse(localStorage.getItem(this.paginationKey))
const pagination = JSON.parse(localStorage.getItem(this.paginationKey))
pagination.rowsPerPage = 0
this.pagination = pagination
}
catch (err) { /* ignored */ }
await this.request({ pagination: this.pagination, filter: this.filter })
......