Comments (5)
Hey,
we didn't exported all types. You should now be able to import the Position enum:
import { Handle, Position } from 'react-flow-renderer';
const HandleWithPosTop = (
<Handle
position={Position.Top}
/>
);
This should work with v.1.3.7
from react-flow.
I ran into the same issue. I believe the fix should work. Thanks.
from react-flow.
Hi @moklick
I updated to 1.3.7 and I'm getting a couple more errors using your fix:
Module '"../../../node_modules/react-flow-renderer/dist"' has no exported member 'Position'. Did you mean to use 'import Position from "../../../node_modules/react-flow-renderer/dist"' instead?ts(2614)
TS2322: Type '{ type: "target"; position: Position.Top; className: string; }' is not assignable to type 'IntrinsicAttributes & HandleProps'. Property 'className' does not exist on type 'IntrinsicAttributes & HandleProps'.
from react-flow.
hey @jeremypeters,
I set up a codesandbox with example ts code:
https://codesandbox.io/s/react-flow-customnode-ts-lu18j?file=/src/Flow.tsx
className
is not a prop type of the Handle
component and Position
gets exported since the last version. Does the code example help you to solve this or is there still an issue with the library?
from react-flow.
Hey
from react-flow.
Related Issues (20)
- Error when clicking edge source end with onReconnect HOT 2
- NodeResizer lineStyle boderStyle invalid HOT 5
- Documentation website UX issue HOT 3
- [Typescript] useStore hook doesn't respect ReactFlowState generic HOT 2
- How can i prevent or stop the mouse event when i render the three.js model in reactflow HOT 9
- Floating Edges Example have some issue HOT 1
- useUpdateNodeInternals doesnot update node dimensions on dynamic increase of handles HOT 4
- Setting nodeExtent prevents group panning. HOT 2
- orientation prop missing on Control component HOT 2
- Node thumbnails are not displayed in MiniMap HOT 1
- Can't test ReactFlow in vitest HOT 1
- On hooks page for useKeyPress, a row inside Signature is not L HOT 2
- Moving a part of diagram is not working properly for Edited edges points HOT 1
- Calling `getNodes` does not return new added nodes using `addNodes` HOT 4
- Can the Interactive button be set to default true or false? HOT 1
- Node resizing with onResizeEnd not working on iPad
- [v12] getMarkerEnd not exported HOT 6
- Connecting edges creates erroneous duplicate edges when selectionOnDrag=true HOT 3
- ReactFlow v12 - class `nodrag` doesn't prevent selection as it did in previous versions HOT 2
- Make ViewportPortal a ForwardRef Component
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-flow.