TanStack / ranger

🤖 Headless utilities for building range and multi-range sliders in React, Preact, Solid, Vue, Svelte and Angular
MIT License
753 stars 63 forks source link

onRelease should have access to value #10

Closed andrewdang closed 4 years ago

andrewdang commented 6 years ago

I was wondering if it was possible to call a function with the value using onRelease instead of the mouse event since I don't want to have to do checks in my onChange handler.

<ReactRanger
  ...
  onRelease={value =>
    this.setState({ value })
  }
>
aphillipo commented 5 years ago

Won't the value have already been set by the onChange?