question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change limit dynamically

See original GitHub issue

Is it possible to change the limit of the slider dynamically? As I see it’s set on ngInit() but I need to change it later because I have different sliders influencing each other?

I’m trying to set it this way: <nouislider [connect]="[false,true, false]" [limit]="sliderPointsLeft" [min]="0" [max]="1000" [step]="1" [formControl]="theForm.controls.range" (update)="sliderUpdate(item.id,$event)"></nouislider>

So sliderPointsLeft is changed any time some of the sliders is used.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Talanoffcommented, Apr 24, 2018

You can do like this: this.priceSliderRef.slider.set([+valueToSet1, +valueToSet2]);

1reaction
IgorceJovanoskicommented, Feb 1, 2018

Hey, just a a shout for changing dynamically the range for angular2 or higher, I used the advices with the view child and update options tl;dr; front: <nouislider [connect]="true" [step]="1" [min]="modelMonthlyCost.min" [max]="modelMonthlyCost.max" [(ngModel)]="monthlyCostRange" [ngModelOptions]="{standalone: true}" (change)="changeMonthlyCost()" #monthlyCostSlider></nouislider>

back: @ViewChild('monthlyCostSlider') public monthlyCostSlider: NouisliderComponent . . . this.monthlyCostRange = [+newModelMonthlyCost.min, +newModelMonthlyCost.max]; if (this.monthlyCostSlider.slider) this.monthlyCostSlider.slider.updateOptions({ start: [+newModelMonthlyCost.min, +newModelMonthlyCost.max], range: { min: +newModelMonthlyCost.min, max: +newModelMonthlyCost.max } });

Hope it helps, works for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set limit value dynamic? - sql - Stack Overflow
I would suggest using row_number() : select l.module_name, l.Name, l.created_date from (select l.*, row_number() over (order by created_date ...
Read more >
Change Spec Limits dynamically and have plots update ...
I would like to add a additional display box that allows the user to change the Column Property Spec Limits and have the...
Read more >
Manage membership automatically with dynamic groups
(Optional) Change access settings to suit your needs. Click Done. You can create up to 100 dynamic groups per customer. This limit can...
Read more >
Dynamically modify the resource parameters of a pod
To dynamically modify the memory limit of a pod by using cgroups, perform the following steps: Note If you modify the CPU limit...
Read more >
Feedback wanted: how to update joint limits dynamically #1180
This way you can specify specific limits for specific joints. Any limits left out will just use what's stored in the robot model....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found