Merge pull request #16 from x3388638/patch-search-case
Search courses case-insensitively
This commit is contained in:
commit
6d9a9a55db
@ -53,13 +53,8 @@ var coursesList = {
|
|||||||
this.selectedTime = temp
|
this.selectedTime = temp
|
||||||
},
|
},
|
||||||
'find_name': function () {
|
'find_name': function () {
|
||||||
var temp = []
|
const target = this.find_name.toLowerCase();
|
||||||
for (var c of this.courses) {
|
this.foundedCourses = this.courses.filter((c) => c.name.toLowerCase().includes(target));
|
||||||
if (c.name.indexOf(this.find_name) != -1) {
|
|
||||||
temp.push(c)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.foundedCourses = temp
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
template: `
|
template: `
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user