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(textfield-enhancements): Text field enhancements #199

Merged
merged 22 commits into from
Oct 25, 2019

Conversation

juanigalan91
Copy link
Contributor

@juanigalan91 juanigalan91 commented Oct 21, 2019

Due to the upcoming feature Autocomplete and Autocomplete multiple there are some changes that we need on the Text Field:

  • In order to have the possibility to show a list of chips before the Text Field, we add the props chips to the Text Field and show them before the native input.

Screenshot 2019-10-25 at 10 32 56

  • In order to have the ability to listen to the focus and blur events on the text field itself, it was necessary to add the props onFocus and onBlur 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 isClearable was added in order to allow erasing the content on the text field.
    ECmxFl0MH2

  • 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

@juanigalan91
Copy link
Contributor Author

@pidupuis @gcornut we can once again do a review on this one, sorry for the long list of commits !

@matmkian matmkian merged commit d13372b into master Oct 25, 2019
@matmkian matmkian deleted the feat/textfield-after branch October 25, 2019 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants