-
Notifications
You must be signed in to change notification settings - Fork 461
[AutoComplete] Enable "Multiple = false" when selecting a single item is desired #3571
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] Enable "Multiple = false" when selecting a single item is desired #3571
Conversation
|
@StevenRasmussen wouldn't it make more sence to provide an itemprovider to the But I agree the current behaviour for single items within |
|
@MarvinKlein1508 - That might work if you only have a small list of items. However, when working with large datasets and you want to be able to search/filter items then the AutoComplete allows you to do this with the |
|
@dvoituron - Thanks for the feedback :). Regarding your points:
|
…epending on the current name.
.../Core/List/FluentAutocompleteTests.FluentAutocomplete_Keyboard-ArrowDown.verified.razor.html
Outdated
Show resolved
Hide resolved
Here are a few websites to explain Accessibility:
The best solution is to use a tool such as NVDA to validate the result. |
|
@dvoituron - Thanks for the pointers regarding accessibility. I introduced changes that I believe have addressed your concern. That being said, I feel a bit like I'm blindfolded and trying to hit a dart board... I'm not quite sure what an acceptable solution is for accessibility. Please let me know if additional changes need to be made, otherwise I feel like the PR is ready for review again. Thanks! |
|
@dvoituron - I wanted to check-in to see if you needed any additional changes to this PR. Thanks! |
…f directly putting the attribute on the element and evaluating with a function.
dvoituron
left a comment
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.
This seems good. Small syntax change and I'll check the working component
|
@dvoituron, @vnbaaij - Thanks for your consideration on this. I think the community is going to appreciate this enhancement 😄 |
|
just implemented the new version: it solves a lot of problems, thanks |
|
@StevenRasmussen is there any easy way to allow the user to set the selection back to null/empty when he hits the delete/backspace key? |
|
In version 4.11.9, when the FluentAutocomplete component sets the Multiple=false parameter, the following error occurs: Unable to set property 'Multiple' on object of type 'Microsoft.FluentUI.AspNetCore.Components.FluentAutocomplete`1[[Reprehendo.Dtos.ScadaGroupDto, Reprehendo.Dtos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. The error was: For FluentAutocomplete, this property must be True. Set the MaximumSelectedOptions property to 1 to select just one item. Code example: Is this already resolved? |
The latest version supports `Multiple=false" : you have a live example here. |
|
Well it doesn't work when I replicate it in my solution. |
If you are 100% sure you are using the correct version, then please create a new issue (with ready to run reproduction code) for this. |
|
|
@xebamart can you please create a new issue and provide a ready to tun repository? |
@MarvinKlein1508 - You can unselect an option by tabbing to the It could be a good enhancement to add support for the |
|
In version 4.12.0 it works correctly. |



Pull Request
📖 Description
When the
MaximumSelectedOptions == 1, the control is rendered less than ideal due to the inherent nature that the control is expecting more than one item to be selected. This PR seeks to improve both the UI and UX of the FluentAutoComplete when only 1 item is desired.🎫 Issues
Here is how the control renders like when the
MaximumSelectedOptions == 1Here is how the control renders with this PR:
✅ Checklist
General
Component-specific