Code Monkey home page Code Monkey logo

Comments (8)

rzajac avatar rzajac commented on June 3, 2024

The slider is just a component representing min / max values. Its responsibility is not to validate your inputs.

from angularjs-slider.

vikasgulati avatar vikasgulati commented on June 3, 2024

Then at-least this component should provide a callback or something for validating inputs.

from angularjs-slider.

rzajac avatar rzajac commented on June 3, 2024

Again, this is just the presentation component. All user inputs and validating should be handled outside of it in your code. Another words it expects to get already validated inputs (min, max, floor, ceil... ).

from angularjs-slider.

vikasgulati avatar vikasgulati commented on June 3, 2024

And how would that be? How can we prevent a user from sliding the min and max pointers to the same value in case of range slider?

from angularjs-slider.

vikasgulati avatar vikasgulati commented on June 3, 2024

And I am not concerned about the feeding invalid inputs initially to the slider, I am concerned about the case when user can slide the min and max pointer to the same value.

from angularjs-slider.

rzajac avatar rzajac commented on June 3, 2024

Ok now i get what you are saying. Please check the branch validator and rzSliderValidate attribute. I started implementing it but there are still few problems to solve before i merge to master.

from angularjs-slider.

vikasgulati avatar vikasgulati commented on June 3, 2024

Its looking good. I tried it and yes there are some problems. But yes this was exactly what I was talking about. 👍

from angularjs-slider.

rzajac avatar rzajac commented on June 3, 2024

Now it could be done by using slideEnded event and validating model.

from angularjs-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.