-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type System and React DOM Prop Mismatches in @xyflow/react Edge Components #631
Comments
Are you using Custom Edges and trying to do something like // EdgeWrapper.tsx
return (
<svg style={{ zIndex }}>
<g
className={cc([
'react-flow__edge',
`react-flow__edge-${edgeType}`,
edge.className,
noPanClassName,
{
selected: edge.selected,
animated: edge.animated, // <------- Edge animated is set here.
inactive: !isSelectable && !onClick,
updating: updateHover,
selectable: isSelectable,
},
])} Same for the other props you mention, not necessarily a class name but they aren't assigned as attributes to elements. Edit: I see in the reproduction steps that you mention custom edges. |
In the link to my repo you'll see a very basic custom edge.
My understanding was that the |
No it doesn't.
const CustomEdge = (props: EdgeProps) => {
// ...
return <BaseEdge ... />
} |
But there's an example of spreading the props to the
|
Thank you then. I hope the docs get updated soon. I'll see if this also helps resolve the other issues I've outlined above. 🙏🏽 |
I move this issue to the docs, so that we can handle it there. |
What platform were you using when you found the bug?
Live code example
https://github.com/m0nq/cloud-people/blob/dev/mw/agent-node-states/src/components/sandbox-nodes/automation-edge.tsx
Describe the Bug
Hoping this is just something that I'm missing. Been trying to resolve this for 2 days.
Multiple prop type mismatches between @xyflow/react's TypeScript definitions and React DOM expectations:
Steps to reproduce the bug or issue
Expected behavior
Screenshots or Videos
Additional context
The text was updated successfully, but these errors were encountered: