fix(app-store): normalize search to handle spacing and casing issues (#29236)
- Fixes search mismatch for apps like 'Zoho CRM' vs 'zohocrm' - Normalizes input by removing spaces, dashes, and underscores - Updates ZohoCRM display name to 'Zoho CRM' for consistency - Keeps change minimal without expanding search scope
This commit is contained in:
@@ -158,7 +158,14 @@ export function AllApps({ apps, searchText, categories, userAdminTeams }: AllApp
|
||||
: app.category === selectedCategory
|
||||
: true
|
||||
)
|
||||
.filter((app) => (searchText ? app.name.toLowerCase().includes(searchText.toLowerCase()) : true))
|
||||
.filter((app) =>
|
||||
searchText
|
||||
? app.name
|
||||
.toLowerCase()
|
||||
.replace(/[\s\-_]/g, "")
|
||||
.includes(searchText.toLowerCase().replace(/[\s\-_]/g, ""))
|
||||
: true
|
||||
)
|
||||
.sort(function (a, b) {
|
||||
if (a.name < b.name) return -1;
|
||||
else if (a.name > b.name) return 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"/*": "Don't modify slug - If required, do it using cli edit command",
|
||||
"name": "ZohoCRM",
|
||||
"name": "Zoho CRM",
|
||||
"slug": "zohocrm",
|
||||
"type": "zohocrm_crm",
|
||||
"logo": "icon.svg",
|
||||
|
||||
Reference in New Issue
Block a user