File tree 2 files changed +4
-10
lines changed 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -220,16 +220,14 @@ export function useTransition(
220
220
payload . from = callProp ( from , t . item , i )
221
221
}
222
222
223
- const { onRest } : { onRest ?: any } = payload
224
- payload . onRest = result => {
223
+ const { onResolve } = payload
224
+ payload . onResolve = result => {
225
+ callProp ( onResolve , result )
226
+
225
227
const transitions = usedTransitions . current !
226
228
const t = transitions . find ( t => t . key === key )
227
229
if ( ! t ) return
228
230
229
- if ( is . fun ( onRest ) ) {
230
- onRest ( result , t )
231
- }
232
-
233
231
// Reset the phase of a cancelled enter/leave transition, so it can
234
232
// retry the animation on the next render.
235
233
if ( result . cancelled && t . phase != UPDATE ) {
Original file line number Diff line number Diff line change @@ -77,10 +77,6 @@ export type UseTransitionProps<Item = any> = Merge<
77
77
config ?:
78
78
| SpringConfig
79
79
| ( ( item : Item , index : number ) => AnimationProps [ 'config' ] )
80
- onRest ?: (
81
- result : AnimationResult < Controller > ,
82
- transition : TransitionState
83
- ) => void
84
80
/**
85
81
* Called after a transition item is unmounted.
86
82
*/
You can’t perform that action at this time.
0 commit comments