File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
editor/operator/sheet/sheetOperator/toolBox Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ export const OperatorBackToTop: FC<OperatorBackToTopProp> = ({ toTop }) => {
27
27
t . components . editor . operator . sheet . sheetOperator . toolbox
28
28
. OperatorBackToTop . back_to_top
29
29
}
30
- onClick = { ( ) => setPaginationFilter ( defaultPagination ) }
30
+ onClick = { ( ) => {
31
+ setPaginationFilter ( defaultPagination )
32
+ toTop ( )
33
+ } }
31
34
/>
32
35
)
33
36
}
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ export const SheetList: FC<SheetListProps> = () => {
12
12
const operatorScrollRef = useRef < HTMLDivElement > ( null )
13
13
14
14
const toTop = useCallback (
15
- ( ) => operatorScrollRef ?. current ?. scrollIntoView ( ) ,
15
+ ( ) =>
16
+ operatorScrollRef ?. current ?. scrollIntoView ( {
17
+ behavior : 'smooth' ,
18
+ block : 'start' ,
19
+ inline : 'nearest' ,
20
+ } ) ,
16
21
[ operatorScrollRef ] ,
17
22
)
18
23
@@ -22,12 +27,13 @@ export const SheetList: FC<SheetListProps> = () => {
22
27
23
28
return (
24
29
< div className = "flex h-full" >
25
- < div className = "grow px-1 py-4 overflow-auto" ref = { operatorScrollRef } >
30
+ < div className = "grow px-1 py-4 overflow-auto" >
26
31
{ operatorFilteredData . length ? (
27
32
< >
28
33
< div
29
34
key = "operatorContainer"
30
35
className = "flex flex-wrap items-start content-start overscroll-contain relative"
36
+ ref = { operatorScrollRef }
31
37
>
32
38
{ operatorFilteredData . map ( ( { name } , index ) => (
33
39
< div className = "flex items-center flex-0 w-32 h-32" key = { index } >
You can’t perform that action at this time.
0 commit comments