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 }) => {
2727 t . components . editor . operator . sheet . sheetOperator . toolbox
2828 . OperatorBackToTop . back_to_top
2929 }
30- onClick = { ( ) => setPaginationFilter ( defaultPagination ) }
30+ onClick = { ( ) => {
31+ setPaginationFilter ( defaultPagination )
32+ toTop ( )
33+ } }
3134 />
3235 )
3336}
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ export const SheetList: FC<SheetListProps> = () => {
1212 const operatorScrollRef = useRef < HTMLDivElement > ( null )
1313
1414 const toTop = useCallback (
15- ( ) => operatorScrollRef ?. current ?. scrollIntoView ( ) ,
15+ ( ) =>
16+ operatorScrollRef ?. current ?. scrollIntoView ( {
17+ behavior : 'smooth' ,
18+ block : 'start' ,
19+ inline : 'nearest' ,
20+ } ) ,
1621 [ operatorScrollRef ] ,
1722 )
1823
@@ -22,12 +27,13 @@ export const SheetList: FC<SheetListProps> = () => {
2227
2328 return (
2429 < 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" >
2631 { operatorFilteredData . length ? (
2732 < >
2833 < div
2934 key = "operatorContainer"
3035 className = "flex flex-wrap items-start content-start overscroll-contain relative"
36+ ref = { operatorScrollRef }
3137 >
3238 { operatorFilteredData . map ( ( { name } , index ) => (
3339 < 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