Code Monkey home page Code Monkey logo

Comments (6)

cedricve avatar cedricve commented on June 12, 2024

You can do it by using CSS with the first-of-type tag.

.input-range__track .input-range__slider-container:first-of-type .input-range__slider{

from react-input-range.

jedrichards avatar jedrichards commented on June 12, 2024

Ah thanks. Yes, we're doing a similar workaround at the moment.

It would be easier/better to have a single dedicated classname though, since complex selectors and pseudo-classes like :first-of-type etc. are brittle and not resilient to structural DOM changes.

Would be happy to put together a PR. Or else feel free to close, since there are workarounds.

from react-input-range.

cedricve avatar cedricve commented on June 12, 2024

True, if we have time to implement it. But I can live with the first-of-type solution for my specific situation.

from react-input-range.

guncha avatar guncha commented on June 12, 2024

I think passing custom Label and Track components into the main component would accomplish this and any other customization that the users might dream of. I'd like the handles to show the value only when it's being dragged, but, alas, it doesn't seem to be possible currently.

from react-input-range.

jamesnewman12 avatar jamesnewman12 commented on June 12, 2024

i want to be able to use slider one in multiple instances. but when I do so, each slider moves at the same time.

from react-input-range.

tomasztomys avatar tomasztomys commented on June 12, 2024

It cannot with with first of type, because last clicked handle is a last children.

from react-input-range.

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.