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 BooleanField doesn't show label when used in a Show view #6553

Merged
merged 2 commits into from
Sep 8, 2021

Conversation

WiXSL
Copy link
Contributor

@WiXSL WiXSL commented Sep 3, 2021

Fixes #6549

If this is ok, I can do the same for the other fields

Copy link
Contributor

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Thanks!

packages/ra-ui-materialui/src/field/BooleanField.tsx Outdated Show resolved Hide resolved
@WiXSL
Copy link
Contributor Author

WiXSL commented Sep 7, 2021

@djhi, Maybe I should revert this changes in Field components until version 4, what do you think?

@fzaninotto
Copy link
Member

@WiXSL yes, please revert the change you made in the first place that moved the memo call - but please keep the removal of FC!

@WiXSL
Copy link
Contributor Author

WiXSL commented Sep 8, 2021

@WiXSL yes, please revert the change you made in the first place that moved the memo call - but please keep the removal of FC!

@fzaninotto,
The problem is that just without the FC definition I get
TS2339: Property 'propTypes' does not exist on type 'NamedExoticComponent error on defaultProps and propTypes.

If you have a solution for that, I'm all ears

@fzaninotto
Copy link
Member

does @ts-ignore work?

@WiXSL
Copy link
Contributor Author

WiXSL commented Sep 8, 2021

does @ts-ignore work?

Sorry, yes, It seems to work, thank you

@fzaninotto
Copy link
Member

fzaninotto commented Sep 8, 2021

completed by #6564 on other fields

@fzaninotto fzaninotto closed this Sep 8, 2021
@fzaninotto fzaninotto reopened this Sep 8, 2021
@fzaninotto fzaninotto changed the title Fix BooleanField default props Fix BooleanField doesn't show label when used in ShowLayout Sep 8, 2021
@fzaninotto fzaninotto changed the title Fix BooleanField doesn't show label when used in ShowLayout Fix BooleanField doesn't show label when used in a Show view Sep 8, 2021
@fzaninotto fzaninotto merged commit 29661f2 into marmelab:master Sep 8, 2021
@WiXSL WiXSL deleted the fix-default-props branch September 8, 2021 16:15
@fzaninotto fzaninotto added this to the 3.18.1 milestone Sep 8, 2021
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.

BooleanField no longer displays label by default
4 participants