Skip to content

Commit 5f8144f

Browse files
authored
Merge pull request #174 from react-component/adjust-order
refactor: adjust motion trigger order
2 parents c2185c8 + ede6993 commit 5f8144f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MotionThumb.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default function MotionThumb(props: MotionThumbInterface) {
116116
width: `var(--thumb-active-width)`,
117117
};
118118
};
119-
const onAppearEnd = () => {
119+
const onVisibleChanged = () => {
120120
setPrevStyle(null);
121121
setNextStyle(null);
122122
onMotionEnd();
@@ -135,7 +135,7 @@ export default function MotionThumb(props: MotionThumbInterface) {
135135
motionAppear
136136
onAppearStart={onAppearStart}
137137
onAppearActive={onAppearActive}
138-
onAppearEnd={onAppearEnd}
138+
onVisibleChanged={onVisibleChanged}
139139
>
140140
{({ className: motionClassName, style: motionStyle }, ref) => {
141141
const mergedStyle = {

0 commit comments

Comments
 (0)