Change limit dynamically
See original GitHub issueIs 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:
- Created 7 years ago
- Comments:7 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can do like this: this.priceSliderRef.slider.set([+valueToSet1, +valueToSet2]);
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