Add typing to useScrollIntoView ref
This commit is contained in:
Родитель
126acc3979
Коммит
b577576b00
|
@ -3,10 +3,10 @@ import { useEffect } from "react";
|
|||
|
||||
export function useScrollIntoView<T>(
|
||||
selectedElement: T | undefined,
|
||||
selectedElementRef: RefObject<any>,
|
||||
selectedElementRef: RefObject<HTMLElement>,
|
||||
) {
|
||||
useEffect(() => {
|
||||
const element = selectedElementRef.current as HTMLElement | undefined;
|
||||
const element = selectedElementRef.current;
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче