Skip to content

Adding the capability to override the == operator#80

Open
Pablo-Aldana wants to merge 6 commits intophilip-brink:masterfrom
Pablo-Aldana:master
Open

Adding the capability to override the == operator#80
Pablo-Aldana wants to merge 6 commits intophilip-brink:masterfrom
Pablo-Aldana:master

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