react-component / react-component/slider

How to detect click on bar vs drag

Open
#1,033 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

My use case is that I need to do X when user click somewhere on the bar but not by dragging the knob and Y when the user drag the knob.

I did not find any callback or state to let me do that. I also noticed that activeHandleRender has the prop dragging as true even when I don't drag it. I initially wanted to watch the props of the activeHandleRender as workaround but I cannot because of that.

Is there a feature I did not see or it's just not possible currently ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the slider event and activeHandleRender paths, focusing on how the dragging prop is set during clicks and knob movement. Determine whether the existing callbacks expose the distinction between clicking the bar and dragging the knob; done means the issue has a documented supported behavior or a clearly scoped API change.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.