Skip to content

Commit

Permalink
fix: trims search input value when updated
Browse files Browse the repository at this point in the history
  • Loading branch information
cuserox committed Jul 2, 2024
1 parent bb74d56 commit 20cf690
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function MentionsInput({
}, [initialName, resolvedTokens, referenceTokenTypes, type]);

const handleMentionInputChange = React.useCallback((newValue: string) => {
handleChange(name, newValue.replace(/}(?=\s)[^{}]*}/gi, '}'));
handleChange(name, newValue.replace(/}(?=\s)[^{}]*}/gi, '}').trim());
}, [handleChange, name]);

const handleInputBlur = React.useCallback(() => {
Expand Down

0 comments on commit 20cf690

Please sign in to comment.