use-scroll-position icon indicating copy to clipboard operation
use-scroll-position copied to clipboard

Fixes #41

Open gnowland opened this issue 3 years ago • 1 comments
trafficstars

Fixes #41

Argument of type 'MutableRefObject<HTMLElement | null>' is not assignable to parameter of type 'MutableRefObject<HTMLElement | undefined>'.
Type 'HTMLElement | null' is not assignable to type 'HTMLElement | undefined'.
Type 'null' is not assignable to type 'HTMLElement | undefined'.ts(2345)

gnowland avatar Mar 14 '22 23:03 gnowland

Do you also need to modify line 40 to something like:

const containerPosition = getClientRect(boundingElement?.current === null ? undefined : boundingElement?.current);

Might be a more elegant way to do it, but that solved it for me.

jeremydrichardson avatar Jun 20 '24 13:06 jeremydrichardson