-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: onAfterChange should not trigger when click on track #952
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -329,7 +329,6 @@ const Slider = React.forwardRef((props: SliderProps, ref: React.Ref<SliderRef>) | |||
|
|||
onBeforeChange?.(getTriggerValue(cloneNextValues)); | |||
triggerChange(cloneNextValues); | |||
onAfterChange?.(getTriggerValue(cloneNextValues)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥 onBeforeChange 可以有, onAfterChange不能?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onAfterChange 必须对应到 mouseup 事件上,现在允许拖拽之后 change 并不代表一定会触发 afterChange
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #952 +/- ##
=======================================
Coverage 99.81% 99.82%
=======================================
Files 13 13
Lines 551 561 +10
Branches 151 160 +9
=======================================
+ Hits 550 560 +10
Misses 1 1 ☔ View full report in Codecov by Sentry. |
close ant-design/ant-design#46158