Przeglądaj źródła

make onElementClick optional

ad1992 3 lat temu
rodzic
commit
14a23c6c50
1 zmienionych plików z 1 dodań i 1 usunięć
  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;