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 #1689 - props mutated in TextInput render method. #1755

Closed
wants to merge 2 commits into from
Closed

Fix #1689 - props mutated in TextInput render method. #1755

wants to merge 2 commits into from

Conversation

admmasters
Copy link
Contributor

Closes #1689 - mutating props within the render method.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jun 26, 2015
var props = {
...this.props,
style: [styles.input, this.props.style]
};
Copy link
Contributor

Choose a reason for hiding this comment

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

can you update this to use spaces instead of tabs?
also put a trailing comma after the last property

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem - sorry, been away for a few days, will look at doing this shortly.

@admmasters
Copy link
Contributor Author

Fixed a flow warning and updated the PR to use spaces instead of tabs.

@admmasters admmasters closed this Jul 5, 2015
@admmasters
Copy link
Contributor Author

Sorry, my bad, got some issues with Flow - having trouble validating against: 'Text.propTypes.style' on line 286 and not hugely up on spread syntax yet. #66b6e61 breaks Flow.

@ide
Copy link
Contributor

ide commented Jul 5, 2015

@admmasters try Object.assign({}, this.props) which I believe is recognized by Flow.

@admmasters
Copy link
Contributor Author

Again - a mad week - I was going to suggest whether or not you wanted me to use Object.assign to close this off :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants