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

[RFR] Fix ReferenceInput Ignore its sort prop #3783

Merged
merged 2 commits into from
Oct 7, 2019

Conversation

djhi
Copy link
Contributor

@djhi djhi commented Oct 7, 2019

Fixes #3642

@djhi djhi added this to the 3.0.0 milestone Oct 7, 2019
// We need to keep the current sort synchronized with the sort prop
// because the inner component may call the setSort too
useEffect(() => {
if (!isEqual(sort, sortOverride)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the !? I'd expect that the effect does nothing if the props are equal, and sets the sort if the props are different. That makes me think that you are probably missing a unit test.

@fzaninotto fzaninotto merged commit 444da94 into next Oct 7, 2019
@fzaninotto fzaninotto deleted the fix-reference-input-sort branch October 7, 2019 14:55
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.

None yet

2 participants