Explorar o código

make onElementClick optional

ad1992 %!s(int64=3) %!d(string=hai) anos
pai
achega
14a23c6c50
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/types.ts

+ 1 - 1
src/types.ts

@@ -263,7 +263,7 @@ export interface ExcalidrawProps {
   ) => void;
   renderCustomElementWidget?: (appState: AppState) => void;
   customElementsConfig?: CustomElementConfig[];
-  onElementClick: (
+  onElementClick?: (
     element: NonDeleted<ExcalidrawElement>,
     event: React.PointerEvent<HTMLCanvasElement>,
   ) => void;