-
Notifications
You must be signed in to change notification settings - Fork 460
[AutoComplete] Add OptionComparer to prevent duplicate items from different object instances (#3881) #3882
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
Conversation
|
I'll try to check and get this in ASAP. Was about to release 4.12 but think we can squize this in. |
|
You won't believe how happy this would make me! |
|
btw. can you tell me how you can merge the master this fast into the branch? In my own projects I always need to pull it in VS and merge it with the git menu. |
|
@dvoituron would it be a good idea to overwrite |
|
No. If we add a feature, we have to develop it from A-Z. Why should it only be for Autocomplete? |
Because all other lists doesn't allow you to fetch different instances. The all have one parameter to provide items. Only |
|
@dvoituron I have added tests for the other components too. The other two components can only be affected when your binded list contains different instances then the provided list via item parameter. This could only happen if you fetch this the list which is bound to from the database and a second list of items which contain all items. |
|
If this parameter is only used with the Autocomplete, why to add this parameter in the ListBase? You can add this parameter in the Autocomplete and override This is logical to have this parameter only for the Autocomplete. |
|
@dvoituron forget what I said about only for
This will also fix this behaviour as well :) |
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.
Last small changes before to merge
Pull Request
📖 Description
This PR introduces a new parameter
OptionComparertoListComponentBasewhich can be used to check an item before it's being added to aFluentAutocompletecomponent. This makes it much easier to use this component when you are fetching new object instances from external APIs or from a database without Entity Framework.Demo and Unit-test have also been added.
Example:

🎫 Issues
Fix #3881
✅ Checklist
General
Component-specific