-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[AutoComplete] Add multiselect & selectedOptions features + improvements #5018
Conversation
if needed, i have a CodeExample showing all 3 usecases: a. single value Autocomplete b. multiselect autocomplete (with checkboxes) c. multiselect autocomplete (without checkboxes and with MenuItem nodes) An external container below the 3 autocompletes shows the selected options with Chips known issues: - When deselecting an option from a Chip, CodeExample doesnot notify the corresponding AutoComplete - UseCase c: Using WithCheckboxes with node type items makes check marks horribly unlined with the item's contents - Untested under mobile environments
Demo showing 3 usecases: - single value autocomplete - AutoComplete multiple selections with checkboxes and preselected values - AutoComplete multiple selections without checkboxes with node type items
changed back state.preSelectedOptions into props.selectedOptions for easier notifications from parent to child.
@Sharlaan are you still planning on getting this merged in? Anything I can do to help with the merge conflicts? Would love to see this feature get into the next release? |
Hi Amala, it would be nice if the M-UI team accepts this PR for merge but i don't know how to resolve those conflicts which arenot even pointed out ... Feel free to teach me, i never did any merge. I suspect these conflicts coming from the fact my build arrived "late" compared to the master's version, but i might be wrong and don't know the solution. |
Just found an excellent alternative: |
@Sharlaan sorry I just saw this message--I can resolve the conflicts for you. How complete is your PR with test coverage, etc..? |
@leMaik love your library (material-ui-chip-input) would you be open to submitting a PR to this project to add it? |
@amalahussein |
@amalahussein I'd love to! :) But there are still some features missing that I'd like to add before submitting a PR (see the issues). Also, there are no tests (except for storybook stories) at the moment. Regarding the linter: Do you really use StandardJS? I saw loads of semicolons in the code... 😮 Edit: This chip input would greatly benefit from this PR, because an |
"Regarding the linter: Do you really use StandardJS? I saw loads of semicolons in the code..." |
@Sharlaan I just wondered because material-ui doesn't use StandardJS. They have semicolons and dangling commas everywhere. I don't think that this will get merged unless it follows their linter settings. 😉 |
Dang... good point :( |
@Sharlaan does this mean it's abandoned? |
@Sharlaan Did you just close this because the code isn't linted? 😮 |
It's not abandoned but i'm struggling setting up, keeping the fork up-to-date, and integrating the project with the MUI environment... especially the next branch (no point to do it for the current version 0.16 ?) I also decided to rewrite from scratch to propose an all-in-one SelectField :
Current webpackbin here. EDIT: i just noticed this nice idea, i'll try to implement it as well. |
Just another nice react-autosuggest, though not multiSelectable, it supports optgroups and other niceties. |
Any update on this ?
I did implemented the same thing but I had some issues and it didn't worked well in the end. I want to know if you were more successful 😄 |
AutoComplete with multiple selections and pre-selections
Demo
CodeExample page showing all 3 usecases:
a. single value Autocomplete
b. multiselect autocomplete (with checkboxes)
c. multiselect autocomplete (without checkboxes and with MenuItem nodes)
An external container below the 3 autocompletes shows the selected options with Chips
New properties
Note: in all cases, the textfield responsibility is only for searching terms, displaying results is externalized to another component, via onNewRequest(results, index).
Improvements
Known issues
Related issues
Alternative implementation: #4252
closes #4952
closes #1956
Please report me any bugs or suggestions !