reactablejs icon indicating copy to clipboard operation
reactablejs copied to clipboard

fix import location for DraggableOptions, DropzoneOptions, ResizableOptions

Open thijs-qv opened this issue 2 years ago • 2 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

The imports for DraggableOptions, DropzoneOptions, ResizableOptions could not be resolved.

Here is the diff that solved my problem:

diff --git a/node_modules/reactablejs/dist/src/index.d.ts b/node_modules/reactablejs/dist/src/index.d.ts
index 4645aea..bd8f173 100644
--- a/node_modules/reactablejs/dist/src/index.d.ts
+++ b/node_modules/reactablejs/dist/src/index.d.ts
@@ -1,12 +1,15 @@
+import { DraggableOptions } from '@interactjs/actions/drag/plugin';
+import { DropzoneOptions } from '@interactjs/actions/drop/plugin';
+import { ResizableOptions } from '@interactjs/actions/resize/plugin';
 import * as React from 'react';
 export interface InjectedProps {
     getRef: React.Ref<string> | React.LegacyRef<string>;
 }
 export interface InteractProps {
-    draggable?: Interact.DraggableOptions | boolean;
-    resizable?: Interact.ResizableOptions | boolean;
-    gesturable?: Interact.ResizableOptions | boolean;
-    dropzone?: Interact.DropzoneOptions | boolean;
+    draggable?: DraggableOptions | boolean;
+    resizable?: ResizableOptions | boolean;
+    gesturable?: ResizableOptions | boolean;
+    dropzone?: DropzoneOptions | boolean;
     onDragStart?: Interact.ListenersArg;
     onDragMove?: Interact.ListenersArg;
     onDragEnd?: Interact.ListenersArg;

This issue body was partially generated by patch-package.

thijs-qv avatar May 25 '23 15:05 thijs-qv

Can you try install the previous version of interactjs ? I think that would fix this issue. or would you mind taking a look this issue? This issue might be caused by TS types locations changes of interactjs

beizhedenglong avatar Jun 02 '23 08:06 beizhedenglong

Yeah, the type locations probably changed, that's why I included the diff that fixes it

thijs-qv avatar Jun 06 '23 12:06 thijs-qv