Closed guillaumervls closed 5 years ago
Looking for the active
class seems like a really bad way for doing this. Setting the active
class in _forceValueFromPosition
is wrong though, as the handle should only be active while being moved.
Instead we should change the callback argument to an object that contains the value
and the index
.
IMHO, the handle should be active as soon as you "mouse-down". So if active
isn't set in _forceValueFromPosition
, it should be somewhere else. Also I agree that onChange(value, index)
would be nice.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It's useful to get the moved handle in
onChange
(by looking for theactive
the class). BTW, a "cleaner" way to get this info would be nice ;) .