We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fde71df + d9230e4 commit f8ff23bCopy full SHA for f8ff23b
src/shared/components/challenge-listing/Filters/ChallengeSearchBar/index.jsx
@@ -27,14 +27,14 @@ export default function ChallengeSearchBar({
27
<div styleName="ChallengeSearchBar">
28
<input
29
onChange={event => setQuery(event.target.value)}
30
- onKeyPress={event => (event.key === 'Enter' ? onSearch(query) : null)}
+ onKeyPress={event => (event.key === 'Enter' ? onSearch(query.trim()) : null)}
31
placeholder={placeholder}
32
type="text"
33
value={query}
34
/>
35
<span
36
styleName={`SearchButton ${query ? 'active' : ''}`}
37
- onClick={() => onSearch(query)}
+ onClick={() => onSearch(query.trim())}
38
>
39
<ZoomIcon styleName="zoomIcon" />
40
</span>
0 commit comments