Giter VIP home page Giter VIP logo

Comments (4)

paulmelnikow avatar paulmelnikow commented on June 12, 2024

Hmmm, noticed that _trimAlignValue is using this.props.min and this.props.max, which in componentWillRecieveProps have not been set to their new values. Is that a bug? Or is the intention that the slider ranges can't change?

from react-slider.

qwtel avatar qwtel commented on June 12, 2024

That is definitely a bug.

I put it in there because I observed strange behaviour when suppling values that weren't multiples of step, so I forced them to be via _trimAlignValue. However, I think it should be on the user to provide correct values in the first place (also it says so in the documentation), so I reverted the changes.

Im not sure if it solves your problem however. Could you check out the current master?

from react-slider.

paulmelnikow avatar paulmelnikow commented on June 12, 2024

Thanks, this is clearer, but doesn't quite solve it. I think the problem is that the re-trimming of value is happening in componentWillReceiveProps, which happens before this.props.min and this.props.max get their new values.

Should _trimAlignValue take optional parameters which override props.min and props.max?

from react-slider.

paulmelnikow avatar paulmelnikow commented on June 12, 2024

See #21, let me know what you think.

from react-slider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.