Skip to content

Commit ebb3e6f

Browse files
Merge pull request #106 from cdmathukiya/cdmathukiya-search-api-by-description-also
User can search by description or doc bolck also
2 parents 0dbb844 + 743493b commit ebb3e6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/views/index.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
Filter
115115
</h2>
116116
<p class="text-xs pb-2 font-medium text-gray-500">Hide non matching</code></p>
117-
<input type="text" v-model="filterTerm" @input="filterDocs" class="w-full p-2 border-2 border-gray-300 rounded" placeholder="/api/search">
117+
<input type="text" v-model="filterTerm" @input="filterDocs" class="w-full p-2 border-2 border-gray-300 rounded" placeholder="search route or description">
118118
</div>
119119
</section>
120120
<section class="pt-5 pl-2 pr-2 pb-5 border mb-10 rounded bg-white shadow">
@@ -678,7 +678,7 @@ class="my-prism-editor"
678678
},
679679
filterDocs() {
680680
for (doc of this.docs) {
681-
doc['isHidden'] = !doc['uri'].includes(this.filterTerm)
681+
doc['isHidden'] = (!doc['docBlock'].toLowerCase().includes(this.filterTerm.toLowerCase()) && !doc['uri'].includes(this.filterTerm))
682682
}
683683
},
684684
request(doc) {

0 commit comments

Comments
 (0)