Skip to content
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

Closed
wants to merge 9 commits into from
Closed

feat: Implement dropdown component with search #13

wants to merge 9 commits into from

Conversation

memoyil
Copy link
Contributor

@memoyil memoyil commented Mar 17, 2021

@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.

import { DropdownSearchOptionProps, DropdownSearchProps } from "./types";

const StyledInput = styled(Input)`
border-radius: 16px;
Copy link
Contributor

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

Copy link
Contributor Author

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) {
Copy link
Contributor

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

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@memoyil memoyil requested a review from hachiojidev March 19, 2021 14:13
@memoyil
Copy link
Contributor Author

memoyil commented Mar 19, 2021

@hachiojidev you can review it again

@memoyil memoyil closed this Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants