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

Slider not working with dynamic values. #985

Closed
PardeepJain opened this issue Sep 29, 2016 · 4 comments
Closed

Slider not working with dynamic values. #985

PardeepJain opened this issue Sep 29, 2016 · 4 comments

Comments

@PardeepJain
Copy link

PardeepJain commented Sep 29, 2016

Slider (p-slider) is working fine with dynamic values like this

<p-slider [(ngModel)]="price_range" [style]="{'width':'200px'}" [range]="true" [animate]='true' (onChange)='xyz()'></p-slider>

But when i provide dynamic value in [min] and [max] than animation is not works as expected but function is calling fine
not working code

<p-slider [(ngModel)]="price_range" [style]="{'width':'200px'}" [range]="true" [animate]='true' (onChange)='getBrandList()' [min]='price_range[0]' [max]='price_range[1]'></p-slider>

otherwise works only for default values which is 0,100
is it known bug ?

@rbasniak
Copy link

rbasniak commented Oct 5, 2016

I can confirm this. Here's a simple example:

<p-slider [(ngModel)]="positionX" [min]="-10" [max]="10"></p-slider>

When I drag it to the left, it goes beyond the minimum point:

image

When It's at the left end, the value should be -10, but it's 0

image

Near the middle the value should be 0, but it's 9

image

If I try to move beyond this point, the slider jumps straight away to the far right point, with the right value now:

image

Also, if I set the [step] value, the slider doesn't move at all.

@cagataycivici
Copy link
Member

What is your PrimeNG version?

@PardeepJain
Copy link
Author

@cagataycivici 1.0.0-beta.11

@cagataycivici
Copy link
Member

Duplicate of #1193

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