Slider range - is there a way to check which slider was used?

UI Components for Angular
Post Reply
GretchenGit
Posts: 3
Joined: 14 Jul 2020, 15:36

02 Dec 2020, 10:29

I'm using the slider-component with a range and it works as supposed but I would like to extend the use of it and so I'm wondering if there is an easy way to check which slider was dragged.

This is an scenario of what I want to achieve:
I set min=0 and max=100.
The range difference should never be higher than 30.
So if I start my range with e.g 20, 50 and I drag the left slider to 0, I want the right one to be dragged to 30. If I drag the right one to 80 I want the left one to be dragged to 50.
Any range below 30 is fine and doesn't require any adaption.

I'm working on a workaround by comparing rangeValues on changeEvent but this way seems to be some kind of laborious.

Is there an easier way for checking which slider was moved?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests