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 displayName prop in Field components #6569

Merged
merged 2 commits into from
Sep 14, 2021

Conversation

WiXSL
Copy link
Contributor

@WiXSL WiXSL commented Sep 9, 2021

No description provided.

@fzaninotto
Copy link
Member

Can you explain what you're trying to fix?

Don't we need to do that for many other fields?

@WiXSL
Copy link
Contributor Author

WiXSL commented Sep 9, 2021

Can you explain what you're trying to fix?

The fact that TypeScript loses the displayName if we don't set it explicitly.

Don't we need to do that for many other fields?

I don't know, I could try to add this for others that doesn't have it If you want

@fzaninotto
Copy link
Member

How can I reproduce this problem?

@WiXSL
Copy link
Contributor Author

WiXSL commented Sep 10, 2021

I just through the Email field has to have the same treatment as the UrlField in that respect.
But you're right, I'm not actually fixing a reproducible problem.

@fzaninotto
Copy link
Member

I have reproduced the problem: using the ReactDevTools, EmailField renders as "Anonymous" while the other fields are properly labeled:

image

I think it's the result of using memo. That means that other fields are also impacted. would you mind generalizing your change to all Field components using memo?

@WiXSL WiXSL changed the title Fix EmailField displayName prop Fix displayName prop in Field components Sep 11, 2021
@WiXSL WiXSL changed the title Fix displayName prop in Field components Fix displayName prop in Field components Sep 11, 2021
@fzaninotto
Copy link
Member

There is something I don't understand: your 3rd commit should create a conflict, as the Field components you've patched have already been fixed in master.

Could you rebase on master?

@WiXSL
Copy link
Contributor Author

WiXSL commented Sep 14, 2021

Done

@fzaninotto fzaninotto merged commit f4b7c8f into marmelab:master Sep 14, 2021
@fzaninotto
Copy link
Member

Thanks!

@fzaninotto fzaninotto added this to the 3.18.2 milestone Sep 14, 2021
@WiXSL WiXSL deleted the fix-emailfield-displayname branch September 14, 2021 20:22
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.

2 participants