-
Notifications
You must be signed in to change notification settings - Fork 0
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
react-components: Add Autocomplete component #161
base: main
Are you sure you want to change the base?
Conversation
…//github.com/PeculiarVentures/peculiar-ui into mariktar/add-new-autocoplete-component
…into mariktar/add-new-autocoplete-component
f5beeae
to
2667d50
Compare
…into mariktar/add-new-autocoplete-component
…/add-new-autocoplete-component' of https://github.com/PeculiarVentures/peculiar-ui into mariktar/add-new-autocoplete-component
@@ -525,6 +527,20 @@ Multiple extends boolean | undefined = false, | |||
selectNewValue(event, option, index, 'removeOption'); | |||
}; | |||
|
|||
const handleDeleteAllValues = (event: React.SyntheticEvent) => { |
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.
Let's use the getClearProps
instead and group clear props together.
* | ||
*/ | ||
|
||
export const Autocomplete = < |
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.
className, | ||
size, | ||
placeholder, | ||
label, |
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.
size, | ||
placeholder, | ||
label, | ||
disabled = false, |
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.
Turning off the component (disabled=true
) also has no effect. The component is not blocked and continues to work.
} | ||
}; | ||
|
||
const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => { |
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.
When the tab is used, the component menu opens and stops working with the keyboard.
Reproduce:
- Make sure that the component is not in focus, click on tab. The component must be in focus.
- Click the tab again. The component menu opens, the focus disappears and the component itself does not respond to other keys.
Add new Autocomplete component