File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
packages/react-components
react-toast/library/src/components/ToastContainer
react-virtualizer/library/src/hooks Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -132,8 +132,8 @@ export const useToastContainer_unstable = (
132
132
133
133
// Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController
134
134
const userRootSlot = ( data as { root ?: ExtractSlotProps < Slot < 'div' > > } ) . root ;
135
- const onMotionFinish : ToastContainerState [ 'onMotionFinish' ] = React . useCallback (
136
- ( _ , { direction } ) => {
135
+ const onMotionFinish = React . useCallback (
136
+ ( _ : null , { direction } : { direction : 'enter' | 'exit' } ) => {
137
137
if ( direction === 'exit' ) {
138
138
remove ( ) ;
139
139
}
Original file line number Diff line number Diff line change @@ -104,13 +104,10 @@ export const useDynamicVirtualizerPagination = (
104
104
/**
105
105
* On scroll timer that will continuously delay callback until scrolling stops
106
106
*/
107
- const onScroll = React . useCallback (
108
- event => {
109
- clearScrollTimer ( ) ;
110
- setScrollTimer ( onScrollEnd , 100 ) ;
111
- } ,
112
- [ onScrollEnd , clearScrollTimer , setScrollTimer ] ,
113
- ) ;
107
+ const onScroll = React . useCallback ( ( ) => {
108
+ clearScrollTimer ( ) ;
109
+ setScrollTimer ( onScrollEnd , 100 ) ;
110
+ } , [ onScrollEnd , clearScrollTimer , setScrollTimer ] ) ;
114
111
115
112
/**
116
113
* Pagination ref will ensure we attach listeners to containers on change
You can’t perform that action at this time.
0 commit comments