react-component / react-component/slider

<Slider range={{ draggableTrack: true }} defaultValue={[20, 50]} />;轨道模式下 会随机出现鼠标禁用的状态

Open
#1,064 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

禁用中滑动鼠标还是可以晃动滑块位置 只是禁用时晃动的滑块位置不会跟着显示 在鼠标松开后会立即跳到晃动的对应位置 并且触发onChange事件 只要鼠标不在点击在这个页面 在页面范围内晃动 滑块还是可以跟着动 怎么修改一下 鼠标禁用状态下松开后不触发onChange事件 而是可以重新点击轨道进行新一次的拖动 直到不显示鼠标禁用状态时再触发onChange事件 因为这个问题会在Image这个情况下 禁用后松开拖动滑块不会触发外层的滚动 在滚动过程中只能点击一下触发onAfterChange事件才可以进行下一次超出外层容器的内容中的拖动 但是并不是我想触发onAfterChange事件的节点 因为onAfterChange事件中要调接口 视频如下

https://github.com/user-attachments/assets/eccdfbe0-e36d-4712-ab1e-0904076da32c

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 reproducing the range Slider case with draggableTrack and defaultValue={[20, 50]}, using the attached image and video as context. Trace the disabled-state drag behavior and verify that releasing the mouse does not trigger onChange or onAfterChange, while a new track drag remains possible only when the control is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.