ng2-nouislider icon indicating copy to clipboard operation
ng2-nouislider copied to clipboard

not updating model

Open piskula opened this issue 7 years ago • 2 comments

Hi,

I have use-case: when range is changed, also change ngModel to [min,max]. But I always have to click twice, first time range is updated and then ngModel. This is how I use it:

<div class="format-slider">
  <nouislider [config]="upperConfig"
              [step]="step"
              [min]="mRangeChosen[0]"
              [max]="mRangeChosen[1]"
              (change)="onChange($event)"
              [ngModel]="mRangeChosen" ></nouislider>
  <app-timeline-scale [min]="mRangeChosen[0]" [max]="mRangeChosen[1]"></app-timeline-scale>
</div>

Here is live demo and Here is source. Problem is when you enlarge chosen range in upper-slider. This method in your code is called twice, but in wrong order and I don't know how to force timeline to put handle to right position, because in model the value is correct but handle is rendered on bad position.

Looking forward to your reply, thank you

piskula avatar Nov 06 '17 09:11 piskula

timeline-slider This is how I partially solved it.

piskula avatar Nov 06 '17 10:11 piskula

I have the same scenario, @piskula were you able to find the solution?

dineshnagarit avatar Apr 05 '18 09:04 dineshnagarit