Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add RenderableProps to FormRenderProps #575

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

Ben-Ho
Copy link
Contributor

@Ben-Ho Ben-Ho commented Jul 30, 2019

as they are actually added to props for createElement call, destructured
but then re-injected in some cases.

as they are actually added to props for createElement call, destructured
but then re-injected in some cases.
@Ben-Ho
Copy link
Contributor Author

Ben-Ho commented Jul 30, 2019

I know this is not a big thing and the most users of react-final-form don't need this props but I stumbled upon this and thought this is better improved here than in my project. (because it shouldn't hurt... :-) )

@erikras
Copy link
Member

erikras commented Aug 21, 2019

Except they aren't passed, right? If you pass a function as a prop to render, it won't be called with itself.

@Ben-Ho
Copy link
Contributor Author

Ben-Ho commented Aug 21, 2019

That's right. So in the render-prop case the only added prop is children. In component-prop case it's render and children. In my case I was only using the render-prop. So I should check if types actually take some effect/benefit in the component-prop case. If not it should be enough to add only the optional children-prop to the type-definition.

I choose to add the complete RenderableProps because all props already are defined as optional. But component-prop wont ever be part of this object and therefore shouldn't be even defined as optional in this type. I'll change this and check the component-prop case.

@erikras erikras merged commit 648f952 into final-form:master Nov 7, 2019
@erikras
Copy link
Member

erikras commented Nov 18, 2019

Published in v6.3.1.

@lock
Copy link

lock bot commented Dec 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 18, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants