Skip to content

Commit cf47b95

Browse files
erakisrstoenescu
authored andcommitted
Fix: quasarframework#1105 - Datatable fix sort lowercase (quasarframework#1106)
* Searching may be case sensitive or insensitive but not forcing us to search in lower case only. Ref : quasarframework#1105 (comment) * Fix white space issue * Remove semi-colon to respect lint standard * Update table-filter.js
1 parent eeb4050 commit cf47b95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/table/table-filter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ export default {
44
filterMethod: {
55
type: Function,
66
default (rows, terms, cols = this.computedCols, cellValue = this.getCellValue) {
7+
const lowerTerms = terms ? terms.toLowerCase() : ''
78
return rows.filter(
8-
row => cols.some(col => (cellValue(col, row) + '').toLowerCase().indexOf(terms) !== -1)
9+
row => cols.some(col => (cellValue(col, row) + '').toLowerCase().indexOf(lowerTerms) !== -1)
910
)
1011
}
1112
}

0 commit comments

Comments
 (0)