diff --git a/src/ListBox.tsx b/src/ListBox.tsx index 175f459..f8de4bb 100644 --- a/src/ListBox.tsx +++ b/src/ListBox.tsx @@ -82,9 +82,9 @@ function Option({ item, state, className }: OptionProps) { // https://github.com/vector-im/element-call/issues/762 const origPointerUp = optionProps.onPointerUp; delete optionProps.onPointerUp; - optionProps.onClick = (e) => { + optionProps.onClick = useCallback((e) => { origPointerUp(e as unknown as React.PointerEvent); - }; + }, [origPointerUp]); return (