Skip to content

Commit

Permalink
feat: update profile list on character change (#200)
Browse files Browse the repository at this point in the history
* fix: Fixed the Lagging Issue

Co-authored-by: Shyam Tawli <[email protected]>
Merge master branch
  • Loading branch information
bharathkalyans authored May 27, 2023
1 parent d2dbbc4 commit 5619150
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/components/Search/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function Search({ onSearch }) {

const handleInputChange = (event) => {
setSearchValue(event.target.value);
onSearch(event.target.value);
};

const handleSearch = () => {
Expand All @@ -34,21 +35,21 @@ function Search({ onSearch }) {
}, []);

return (
<div className="search-bar">
<input
ref={searchInput}
type="text"
onChange={handleInputChange}
value={searchValue}
placeholder="Search user by name, location or skills"
onKeyDown={handleSearchOnEnter}
/>
<FontAwesomeIcon
onClick={handleSearchButtonClick}
className="search-icon"
icon={faMagnifyingGlass}
/>
</div>
<div className="search-bar">
<input
ref={searchInput}
type="text"
onChange={handleInputChange}
value={searchValue}
placeholder="Search user by name, location or skills"
onKeyDown={handleSearchOnEnter}
/>
<FontAwesomeIcon
onClick={handleSearchButtonClick}
className="search-icon"
icon={faMagnifyingGlass}
/>
</div>
);
}

Expand Down

1 comment on commit 5619150

@vercel
Copy link

@vercel vercel bot commented on 5619150 May 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.