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

Adding the capability to override the == operator #80

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Pablo-Aldana
Copy link

With this change it will delegate the == to the child so that you can override it and it will avoid duplicated items.

An example of this issue:
You have two lists a food menu that you'd like to modify with current food and a food list. as the food menu list children has been pre-generated from DB the DragAndDropItem are different from food list, so you can drag an existing item and it will create duplications. If you delegate the == operator to the DragAndDropItem child the user can control how two objects are equals, if by reference or by something more complex like foodId

Pablo-Aldana and others added 6 commits September 10, 2022 13:04
With this change it will delegate the == to the child so that you can override it and it will avoid duplicated items.
An example of this issue: You have two lists a food menu that you'd like to modify with current food and a food list. as the food menu  list children has been pre-generated from DB the DragAndDropItem are different from food list, so you can drag an existing item and it will create duplications. If you delegate the == operator to the DragAndDropItem child the user can control how two objects are equals, if by reference or by something more complex like foodId
Adding the capability to override the == operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants