Ignore case when searching .
This commit is contained in:
parent
a2c3b98b87
commit
ae1738e9b8
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@ function keyDownSearch(e) {
|
|||
for (let i = 0; i < api.length; i++) {
|
||||
let apiData = api[i];
|
||||
const desc = apiData.desc;
|
||||
if (desc.indexOf(searchValue) > -1) {
|
||||
if (desc.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
searchArr.push({
|
||||
order: apiData.order,
|
||||
desc: apiData.desc,
|
||||
|
@ -39,7 +39,7 @@ function keyDownSearch(e) {
|
|||
for (let j = 0; j < methodList.length; j++) {
|
||||
const methodData = methodList[j];
|
||||
const methodDesc = methodData.desc;
|
||||
if (methodDesc.indexOf(searchValue) > -1) {
|
||||
if (methodDesc.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
methodListTemp.push(methodData);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,8 @@ function keyDownSearch(e) {
|
|||
const code = theEvent.keyCode || theEvent.which || theEvent.charCode;
|
||||
if (code == 13) {
|
||||
const search = document.getElementById('search');
|
||||
const searchValue = search.value;
|
||||
const searchValue = search.value.toLocaleLowerCase();
|
||||
|
||||
let searchGroup = [];
|
||||
for (let i = 0; i < api.length; i++) {
|
||||
|
||||
|
@ -40,7 +41,7 @@ function keyDownSearch(e) {
|
|||
for (let i = 0; i < apiGroup.list.length; i++) {
|
||||
let apiData = apiGroup.list[i];
|
||||
const desc = apiData.desc;
|
||||
if (desc.indexOf(searchValue) > -1) {
|
||||
if (desc.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
searchArr.push({
|
||||
order: apiData.order,
|
||||
desc: apiData.desc,
|
||||
|
@ -53,7 +54,7 @@ function keyDownSearch(e) {
|
|||
for (let j = 0; j < methodList.length; j++) {
|
||||
const methodData = methodList[j];
|
||||
const methodDesc = methodData.desc;
|
||||
if (methodDesc.indexOf(searchValue) > -1) {
|
||||
if (methodDesc.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
methodListTemp.push(methodData);
|
||||
break;
|
||||
}
|
||||
|
@ -69,7 +70,7 @@ function keyDownSearch(e) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (apiGroup.name.indexOf(searchValue) > -1) {
|
||||
if (apiGroup.name.toLocaleLowerCase().indexOf(searchValue) > -1) {
|
||||
searchGroup.push({
|
||||
name: apiGroup.name,
|
||||
order: apiGroup.order,
|
||||
|
|
Loading…
Reference in New Issue