ion.rangeSlider icon indicating copy to clipboard operation
ion.rangeSlider copied to clipboard

Which handle has changed in onChange callback?

Open Rombecchi opened this issue 5 years ago • 1 comments

Hi, I've a problem: the range slider has steps by 1000 and interacts directly to two input boxes. The user can write directly to inputs using any number (not stepped by 1000), so when he use again the slider (changing the other value) it will change both min/max inputs. Is there a method to obtain the element (left handle/ right handle) that has triggered the onChange callback so I can change only that element?

Such like that: https://codepen.io/Rombecchi/pen/KKpKjMq

onChange: function(data) {
	data.slider.changed_element; // expected value returns 'from|to|both'
}

Thank you.

Rombecchi avatar Feb 07 '20 15:02 Rombecchi

Hello, no, where is no such functionality. But you can easily understand it by comparing saved FROM and TO numbers to new ones in callback.

IonDen avatar Feb 25 '20 13:02 IonDen