Closed PiotrObrebski closed 2 years ago
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-digraph@6.7.1 for the project I'm working on.
react-digraph@6.7.1
GraphView component accepts gridSize to be defined with typical CSS values however typescript definition accepts only number or undefined.
Here is the diff that solved my problem:
diff --git a/node_modules/react-digraph/typings/index.d.ts b/node_modules/react-digraph/typings/index.d.ts index e29bd9c..6a02005 100644 --- a/node_modules/react-digraph/typings/index.d.ts +++ b/node_modules/react-digraph/typings/index.d.ts @@ -103,7 +103,7 @@ declare module 'react-digraph' { edgeHandleSize?: number; edgeTypes: any; gridDotSize?: number; - gridSize?: number; + gridSize?: number | string; gridSpacing?: number; layoutEngineType?: LayoutEngineType; maxTitleChars?: number;
I realized how you calculate from the gridSize and it should be in fact number.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-digraph@6.7.1
for the project I'm working on.GraphView component accepts gridSize to be defined with typical CSS values however typescript definition accepts only number or undefined.
Here is the diff that solved my problem: