Skip to content

Commit

Permalink
limit amount of charactors for search input
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kordonets committed Jan 22, 2024
1 parent ae75695 commit 79e7a99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/js/components/Search/BaseSearchbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const SearchInput = styled.input`
padding-left: 12px;
border-radius: 0.25rem;
padding-right: 40px;
&:focus-visible {
border: none;
Expand Down Expand Up @@ -101,6 +102,7 @@ class BaseSearchbox extends React.Component {
value={this.state.searchText}
onChange={this.handleInputChange}
onClear={this.handleClear}
maxLength={50}
/>
{this.state.searchText && <ClearButton onClick={this.handleClear}/>}
</SearchWrapper>
Expand Down

0 comments on commit 79e7a99

Please sign in to comment.