-
Notifications
You must be signed in to change notification settings - Fork 379
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
onSort with *correct* sortProperties #749
Conversation
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.
Looks great! 👍
One tiny comment that's absolutely not a blocker.
})) | ||
)(props => <OriginalComponent {...props} />); | ||
// Obsolete | ||
const EnhancedHeadingCell = OriginalComponent => OriginalComponent; |
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.
Can this be removed?
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.
It can, but it's technically a breaking change. Glad to remove if you're not concerned.
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.
Just to double confirm - we're leaving this here to avoid causing a potential breaking change right? I think we're maybe just outside the realm of where a 2.0 release makes sense. If I'm understanding correctly, we can leave this here for now to avoid breaking change and remove the obsolete field in a 2.0 version.
Thoughts?
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.
Correct. I left it as a no-op to be cleaned up for a 2.0 release.
The chances someone is actually depending on this seem quite low, but it's been exported as part of the public API.
On re-review I noticed a few gaps between core and local versions of |
Griddle major version
1.x
Changes proposed in this pull request
onSort
is now fired just before the newsortProperties
are dispatched.This essentially renders
TableHeadingCell
obsolete, but deleting it is a potentially breaking change.Idea
What if events were fired from a Redux middleware instead of click handlers?
Why these changes are made
Close #716; #717 was insufficient.
Are there tests?
Existing story now demonstrates expected behavior.
It seems like a new React version changed behavior when
render()
returns a string, so the TS story has been adjusted.