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

Fix remove props warnings in CheckboxGroupInput #4216

Merged
merged 2 commits into from
Jan 3, 2020

Conversation

SeanBE
Copy link
Contributor

@SeanBE SeanBE commented Dec 26, 2019

  • Dropping the required flag since a default value is provided when destructuring. Proptypes complains when component is child of a ReferenceArrayInput component.
  • Pull out loaded attribute from rest to avoid fieldet from complaining.
    index.js:1375 Warning: Received true for a non-boolean attribute "loaded".

@SeanBE SeanBE changed the title drop required flag on CheckboxGroupInput choices prop Fix warnings when using CheckboxGroupInput with ReferenceArrayInput Dec 26, 2019
@ThieryMichel ThieryMichel added this to the 3.1.2 milestone Jan 3, 2020
@ThieryMichel ThieryMichel changed the title Fix warnings when using CheckboxGroupInput with ReferenceArrayInput Fix remove props warnings in CheckboxGroupInput Jan 3, 2020
@ThieryMichel ThieryMichel merged commit c307448 into marmelab:master Jan 3, 2020
@fzaninotto
Copy link
Member

In fact, I think the loaded props should be sanitized before passing props to children. So the right fix should be the opposite: add the loaded prop to the sanitizeRestProps of ReferenceArrayInput, and remove it from the SelectArrayInput.

Would you mind working on that patch?

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

3 participants