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

tooltip prop doesn't take effect #37

Closed
ghost opened this issue May 13, 2017 · 2 comments
Closed

tooltip prop doesn't take effect #37

ghost opened this issue May 13, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented May 13, 2017

Passing in the tooltip prop doesn't change the value shown in the tooltip.

Expected: tooltip should show 'foobar'
Actual: tooltip shows the numerical value of the slider's position

This important for adding a label to the numeric value (10+ or $10).

        <ReactBootstrapSlider
          value={this.state.currentVal}
          slideStop={this.handleChange}
          step={this.state.step}
          min={this.state.min}
          max={this.state.max}
          tooltip={'foobar'} />

Thanks for making this!

@brownieboy
Copy link
Owner

brownieboy commented May 14, 2017

The tooltip prop is not a value that you want to show on the tooltip. It's a switch that you use to customise when the tooltip is to be displayed. It can have only one of three values: "show", "hide" or "always".

Please see the upstream documentation at https://github.com/seiyria/bootstrap-slider#options

@ghost
Copy link
Author

ghost commented May 17, 2017

Thanks for the explanation. I had searched this repo and saw a prop type of string, which is why I thought it worked that way.

For Googler's, I ended up switching to react-rangeslider which allows use of a formatting function to format the tooltip string. https://www.npmjs.com/package/react-rangeslider

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

1 participant