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
Example about mat-optgroup inside mat-autocomplete #10196
Comments
Thanks @jelbourn for the tags. Indeed the "help wanted" is welcome, because i can't actually find myself how to adapt the Observable type to work with a group... If someone know how to do it, I will really appreciate !! |
Comment updated with a stackblitz demo. |
No one ? No more luck on stackoverflow... 🤐 |
I'd like to take a crack at this if @mmalerba thinks it's a feature worth adding 👍 |
@raygervais sounds good to me. @crisbeto should probably be the one to review it, I'm not too familiar with the autocomplete |
@WizardPC, I forked and completed your |
I'd say that it should only filter the options @raygervais, the groups are only used for grouping similar results together. Here's an example from our demo app that does the same: https://github.com/angular/material2/blob/master/src/demo-app/autocomplete/autocomplete-demo.ts#L131 |
@raygervais thanks for your time ! Works as expected ;) |
Thanks @raygervais 😉 |
Hi @raygervais Is possible to do something like this: https://i.stack.imgur.com/tvAp5.png using the autocomplete, i say, multiple colums in a line. Thanks |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Documentation request
What is the expected behavior?
Having an working example of this code :
https://material.angular.io/components/autocomplete/overview#option-groups
What is the current behavior?
No stackblitz or demo. And it's not easy to understand... because for the "mat-optgroup" you need (implicitly ?) to go to the "Select" component section, and with a group structure (eg: pokemonGroups) the autocomplete filter (eg: filteredOptions: Observable<string[]>;) doesn't work anymore.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-nwdj9u
What is the use-case or motivation for changing an existing behavior?
Having a autocomplete input with group.
Like this for example
Input : "d" <---------- autocomplete
[D <------------------- group
Dog <------------- option1
Dragon <---------- option2
...
]
The text was updated successfully, but these errors were encountered: