Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Allow Textfield error to be of node type #179

Merged
merged 1 commit into from
Jan 6, 2016
Merged

Conversation

Gregoor
Copy link
Contributor

@Gregoor Gregoor commented Jan 6, 2016

In case you want to display a link in the error message.

@tleunen
Copy link
Owner

tleunen commented Jan 6, 2016

PropTypes.node seems to be the right thing to use then to allow all sort of "rendering" elements.

@Gregoor
Copy link
Contributor Author

Gregoor commented Jan 6, 2016

Oh, I did not know this type existed. thanks, will change!
Edit: But wouldn't the type node exclude a string? Well same probably goes for object.
Edit2: Of course, I forgot we have .oneOfType!

@Gregoor Gregoor changed the title Allow error to be of object type Allow error to be of node type Jan 6, 2016
@tleunen
Copy link
Owner

tleunen commented Jan 6, 2016

From the doc

// Anything that can be rendered: numbers, strings, elements or an array
// (or fragment) containing these types.
optionalNode: React.PropTypes.node,

So only node is enough. Also, could you please squash your commits please?

@Gregoor Gregoor changed the title Allow error to be of node type Allow Textfield error to be of node type Jan 6, 2016
@Gregoor
Copy link
Contributor Author

Gregoor commented Jan 6, 2016

It took a while but I think I squashed it. Always grateful for a chance to work on my git skills.

@tleunen
Copy link
Owner

tleunen commented Jan 6, 2016

perfect! :) Thanks @Gregoor

tleunen added a commit that referenced this pull request Jan 6, 2016
Allow Textfield error to be of node type
@tleunen tleunen merged commit d6a75a0 into tleunen:master Jan 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants