-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement dropdown component with search #13
feat: Implement dropdown component with search #13
Conversation
import { DropdownSearchOptionProps, DropdownSearchProps } from "./types"; | ||
|
||
const StyledInput = styled(Input)` | ||
border-radius: 16px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Input already has a border radius of 16px
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
}; | ||
|
||
useEffect(() => { | ||
if (dropdownRef.current) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put dropdownRef
in the dependency list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
|
||
export interface DropdownSearchOptionProps { | ||
label: string; | ||
value: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Number or string? If so ReactText
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@hachiojidev you can review it again |
@Chef-Chungus I implemented as we spoke with minor differences, instead of selecting the item when searching, I filtered out the other items which as a user perspective makes more sense. I would like to hear your opinion as well.