Skip to content

[FEATURE REQUEST] Enabled/disabled option for slider #117

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

Closed
soee opened this issue Sep 3, 2015 · 11 comments
Closed

[FEATURE REQUEST] Enabled/disabled option for slider #117

soee opened this issue Sep 3, 2015 · 11 comments

Comments

@soee
Copy link

soee commented Sep 3, 2015

Hi again,

correct me if i'm wrong but there is no feaure that allows to make slider disabled/enabled based on some expression (like using some attribute: disabled="ctrl.enableSlider == true")?

Working on my project now i would like to have an option to quickly disable/enable slider instance based on some expression and when disabling it also clear/null it's value.

@ValentinH
Copy link
Member

Indeed there is not such a feature and I think it would be nice indeed.

Setting its value to null is not possible because you can't give null values to the slider. I think in most application, when an input is disabled, the value is present but the style shows that it is disabled and the value can't be edited.

So for the slider, once it is disabled, I think we should prevent any editing and setting a different style that make it obvious that it is disabled.

What do you think?

@soee
Copy link
Author

soee commented Sep 3, 2015

@ValentinH I agree with the slider thing. When disabled it shouldn't be draggable and the slider control should be grayed out by default than.

@ValentinH
Copy link
Member

OK, if you are motivated you can start a pull request. Otherwise, I will work on it next week when I will be back from holidays ;)

@soee
Copy link
Author

soee commented Sep 3, 2015

@ValentinH Please do take it. I have full hands of work atm. :|

@ValentinH
Copy link
Member

Let's see next week if I get time and motivation ;)

@Pritoj
Copy link

Pritoj commented Sep 9, 2015

Can't this attribute perform the same thing essentially?

rz-slider-present-only

@ValentinH
Copy link
Member

Yes this enables to remove all events on the slider but it can't be changed at runtime. Moreover, the disable feature should provide a default style for the disabled state.

@ValentinH
Copy link
Member

Tell me if this is OK for you. ;)

@ValentinH
Copy link
Member

See the example on this page: http://rzajac.github.io/angularjs-slider/index.html

@soee
Copy link
Author

soee commented Oct 9, 2015

@ValentinH Looks cool. Can you release it with v0.1.35 ?

@ValentinH
Copy link
Member

Just did it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants