Use normalized text
This commit is contained in:
@@ -456,8 +456,8 @@ export default {
|
|||||||
|
|
||||||
const isFilterTextFoundInDescription = graphqlFieldObject.description
|
const isFilterTextFoundInDescription = graphqlFieldObject.description
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(text)
|
.includes(normalizedText)
|
||||||
const isFilterTextFoundInName = graphqlFieldObject.name.toLowerCase().includes(text)
|
const isFilterTextFoundInName = graphqlFieldObject.name.toLowerCase().includes(normalizedText)
|
||||||
|
|
||||||
return isFilterTextFoundInDescription || isFilterTextFoundInName
|
return isFilterTextFoundInDescription || isFilterTextFoundInName
|
||||||
},
|
},
|
||||||
@@ -470,6 +470,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getFilteredGraphqlTypes({ filterText, types }) {
|
getFilteredGraphqlTypes({ filterText, types }) {
|
||||||
if (!filterText) return types
|
if (!filterText) return types
|
||||||
|
|
||||||
return types.filter((type) => {
|
return types.filter((type) => {
|
||||||
const isFilterTextMatching = this.isTextFoundInGraphqlFieldObject({
|
const isFilterTextMatching = this.isTextFoundInGraphqlFieldObject({
|
||||||
text: filterText,
|
text: filterText,
|
||||||
|
|||||||
Reference in New Issue
Block a user