Skip to content

Commit

Permalink
Removed spaces between the mentions during search
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhayVAshokan committed Jun 21, 2024
1 parent 4554597 commit ff1fc49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Editor/CustomExtensions/Mention/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ export const createMentionSuggestions =

return mentions
.filter(mention =>
mention.name.toLowerCase().includes(query.trim().toLowerCase())
mention.name
.replace(/\s/g, "")
.toLowerCase()
.includes(query.trim().toLowerCase())
)
.slice(0, 10);
};

0 comments on commit ff1fc49

Please sign in to comment.