This repository was archived by the owner on Nov 5, 2023. It is now read-only.
File tree 1 file changed +6
-11
lines changed
1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -367,15 +367,11 @@ export function pipeline({
367
367
// endregion
368
368
369
369
// region: scroll to a given item by index
370
- const scrollAction$ : Observable < ScrollAction > = scrollTo$ . pipe (
371
- filter ( complement ( isNil ) ) ,
372
- switchMap < number , Observable < [ number , ResizeMeasurement , Element ] > > (
373
- ( scrollTo ) =>
374
- combineLatest ( [ of ( scrollTo ) , resizeMeasurement$ , rootResize$ ] ) . pipe (
375
- take ( 1 )
376
- )
377
- ) ,
378
- map < [ number , ResizeMeasurement , Element ] , ScrollAction [ ] > (
370
+ const scrollToNotNil$ :Observable < number > = scrollTo$ . pipe ( filter ( complement ( isNil ) ) )
371
+ const scrollAction$ : Observable < ScrollAction > = combineLatest (
372
+ [ scrollToNotNil$ , resizeMeasurement$ , rootResize$ ]
373
+ ) . pipe (
374
+ mergeMap < [ number , ResizeMeasurement , Element ] , ScrollAction [ ] > (
379
375
( [ scrollTo , resizeMeasurement , rootEl ] ) => {
380
376
const { vertical : verticalScrollEl , horizontal : horizontalScrollEl } =
381
377
getScrollParents ( rootEl ) ;
@@ -425,8 +421,7 @@ export function pipeline({
425
421
} ,
426
422
] ;
427
423
}
428
- ) ,
429
- mergeAll ( )
424
+ )
430
425
) ;
431
426
// endregion
432
427
You can’t perform that action at this time.
0 commit comments