Conversation
krbarnes
reviewed
Apr 24, 2018
| var isEqual = key == other.key | ||
| isEqual = isEqual && state == other.state | ||
| isEqual = isEqual && style == other.style | ||
| return isEqual |
Contributor
There was a problem hiding this comment.
I think it's ok to just && the conditions together now.
Contributor
There was a problem hiding this comment.
Can you describe the issue that led you to here. The keys and styles are compared separately by TableSectionChangeSet so I would have thought that comparing state was enough here.
Member
Author
There was a problem hiding this comment.
Main reason is that if we want to equate CellConfigTypes outside of the TableSectionChangeSet, it wouldn't take style into account. Though I'm currently revisiting our use case to see if we really do need to equate these.
0c8bc50 to
e6fbc48
Compare
Member
Author
|
Removing the HostCell equality, I don't need it anymore. Now it just removes a warning and the 11.3 demo app restriction. |
raulriera
approved these changes
Apr 25, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This adds
keyandstyleto the equality definition ofCellConfigType. While most style changes are accompanied by state changes, it's not always the case for indexed items that change positions. Adding style makes it more likely we update cells when they change their merged style. This also allows us to compareCellConfigTypes more accurately outside of FunctionalTableData.Bonus ✨