palantir/blueprint

Is there a way to delete a slider handle with a mouse event?

Open

#4,301 opened on Aug 31, 2020

View on GitHub
 (8 comments) (0 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
P2Package: coreType: feature requesthelp wanted

Description

Environment

  • Package version(s): 3.25.0
  • Browser and OS versions: Ubuntu 18.04, Chrome 84

Question

For the Slider.Handle component, it seems like there's no native event listeners other than onChange and onRelease. I wanted to implement something like a double click to remove a handle. I'm guessing that the onClick listener is not supported due to interfering with the drag behavior, but I was wondering if there was any other way I could implement something similar. I got around the addition by having another button on the right that would add a handle on the right side, but it would be nice if I can add a handle anywhere on the slider track more intuitively.

Contributor guide