tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
184 stars 114 forks source link

Bug when moving right handle #134

Open MerlinDuChaos opened 6 years ago

MerlinDuChaos commented 6 years ago

Hi,

I'm using ng2-nouislider version 1.7.4, and nouislider version 10.0.0. and I experience a strange bug when using the slider with 2 handles and databound values.

The bug can be seen here: https://imgur.com/GpUL2vr

Here is the code I use:

<nouislider [connect]="true" 
                #sliderRef
                [(ngModel)]="SelectedRange"
                [behaviour]="drag"
                [min]="SliderMinValue"
                [max]="SliderMaxValue"
                style="margin:20px 30%"
                [config]="SliderConfig"
                [step]="60000"></nouislider>

 public SliderMinValue: number;
 public SliderMaxValue: number;
 public SelectedRange: number[];

public SliderConfig = {
        pips: {
            mode: 'count',
            density: 2,
            values: 5,
            stepped: true,
            format: new TickDateFormatter()
        }
    };

I tried downgrading nouislider to version 9.2.0 and this worked, but I need a functionnality introduuced in version 10 (pips labels refreshing when changing options) so it is not an option for me.

What is wrong ? I don't experience that behaviour on the demo website...

MerlinDuChaos commented 6 years ago

Just to add info, I experience the same bug with a simpler version:

    <nouislider [connect]="true"
                [(ngModel)]="SelectedRange"
                [min]="0"
                [max]="100"
                style="margin:40px 30%"
                [step]="5"></nouislider>
alkorschun commented 6 years ago

I have exactly the same problem, but with my left handle. Very strange

kanaganraj commented 6 years ago

Exactly the same issue i'm facing. can you please any one answer this?.,

alkorschun commented 6 years ago

I solved this problem by installing the previous version of nouislider (Not ng2-nouislider). That worked for me

kanaganraj commented 6 years ago

Which version you have installed. what the commend to install previous version please.

alkorschun commented 6 years ago

I think it was something like this: npm install nouislider@9.2.0

rehnan commented 4 years ago

@Nemeth050506 thanks! Works for me!

npm i nouislider@9.2.0 npm i ng2-nouislider@1.8.2