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

Changing # of children causes prop discrepency. #59

Closed
YourDeveloperFriend opened this issue Nov 2, 2015 · 4 comments
Closed

Changing # of children causes prop discrepency. #59

YourDeveloperFriend opened this issue Nov 2, 2015 · 4 comments

Comments

@YourDeveloperFriend
Copy link

This bug is apparent when you use both value and children. Example:

render: function() {
  return <ReactSlider withBars={true} value={this.state.value}>
    {this.state.labels.map(function(label) { return <div>{label}</div>; })}
  </ReactSlider>
}

If you add a value to both value and labels, neither display in the react slider. Here's a jsfiddle demonstrating the bug. The offending code is in the _or function, which relies on this.props.children, but doesn't pull the new children from the updated props in componentWillReceiveProps. Here's that same jsfiddle, with a fix, which I will include in a PR.

YourDeveloperFriend added a commit to RedRabbitDevelopment/react-slider that referenced this issue Nov 2, 2015
@vinayakpatil
Copy link

Why is this not merged yet? I am facing the same issue. I also have the similar fix.

@vinayakpatil
Copy link

@mpowaga Any update on this PR? I still see this issue, thanks!

@gregtalarico
Copy link

+1

@stale
Copy link

stale bot commented Sep 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 22, 2019
@stale stale bot closed this as completed Oct 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants