Support right click to use file context menu
This commit is contained in:
parent
6188b9287c
commit
117c1b1778
4 changed files with 94 additions and 49 deletions
|
@ -1,6 +1,6 @@
|
|||
import { useEffect, useRef } from 'react';
|
||||
|
||||
export default (eventName: string, handler: any, element: any = window) => {
|
||||
export default (eventName: string, handler: (e: Event | CustomEvent | UIEvent | any) => void, element: any = window) => {
|
||||
const savedHandler = useRef<any>(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue