-
Notifications
You must be signed in to change notification settings - Fork 8
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(textfield-enhancements): Text field enhancements #199
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcornut
approved these changes
Oct 21, 2019
pidupuis
approved these changes
Oct 22, 2019
4bc054b
to
89b6097
Compare
gcornut
approved these changes
Oct 23, 2019
232b973
to
7582e01
Compare
d747920
to
668a672
Compare
a4f5396
to
59f700f
Compare
gcornut
approved these changes
Oct 25, 2019
hchevallier
approved these changes
Oct 25, 2019
pidupuis
approved these changes
Oct 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to the upcoming feature
Autocomplete and Autocomplete multiple
there are some changes that we need on the Text Field:chips
to the Text Field and show them before the native input.In order to have the ability to listen to the
focus
andblur
events on the text field itself, it was necessary to add the propsonFocus
andonBlur
and pass them on the native input, where they were overwritten. If these functions are passed on, they will be executed.Furthermore, in order to use this component in conjunction with the Dropdown, we need to provide a
ref
to the Dropdown so it knows where to open. On the other hand, if we want to manually trigger the focus on the text field, we need a reference to the input itself (input or text area, depends on the type of Text Field used). In order to tackle that, two different props are created, one of them associated with the Text field wrapper, and another one associated with to the native input.Also, a prop called
![ECmxFl0MH2](https://user-images.githubusercontent.com/13719066/67406531-7bb7b200-f5b6-11e9-9a9a-1be70cac9360.gif)
isClearable
was added in order to allow erasing the content on the text field.Moreover, a component called ChipGroup was created in order to support a list of chips presented in a grouped fashion, which we will use in the future for the
AutocompleteMultiple
component