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

Remove extra unknown props #2

Closed
wants to merge 6 commits into from
Closed

Remove extra unknown props #2

wants to merge 6 commits into from

Conversation

styks1987
Copy link
Contributor

@@ -150,16 +150,23 @@ var NumberFormat = React.createClass({
this.onChangeHandler(e, this.props.onInput);
},
render: function render() {
var props = this.props;
Copy link
Owner

Choose a reason for hiding this comment

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

Can you make this changes on src files instead of lib?

@@ -150,16 +150,23 @@ var NumberFormat = React.createClass({
this.onChangeHandler(e, this.props.onInput);
},
render: function render() {
var props = this.props;
var props = _extends({}, {}, this.props);
Copy link
Owner

Choose a reason for hiding this comment

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

Why double objects. It can be just

var props = _extends({},  this.props);

Also we can minimze by code by

['thousandSeperator', 'suffix', 'prefix', /* 'all others custom props' */].forEach((key) => {
 delete props[key];
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with changes

Copy link
Owner

@s-yadav s-yadav left a comment

Choose a reason for hiding this comment

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

So lib files are generated files, you don't have to manually change it. Plus the changes in lib file and src files are different.
Ok let me make those changes and commit it.

@s-yadav
Copy link
Owner

s-yadav commented Sep 24, 2016

For future fixes can you follow the development guide mentioned in readme. Let me know if you find any difficulty setting it up locally.

@s-yadav s-yadav closed this in 8b76b63 Sep 24, 2016
@jagkum jagkum mentioned this pull request Apr 4, 2017
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.

None yet

2 participants