Comments (3)
Could you create a codensadbox for this?
from xyflow.
I think there's a mix of confusion with this one but revealed what I think is an issue with this hook: the arrays already contain the selected elements so there's no need of checking the selected
flag. but at the same time, all of them come back as selected: false
, which happened to trigger another issue on my end. looks like the event is emitted before the state of the node/edge is changed.
from xyflow.
There is no need to collect selected nodes/ edges on your side. You can iterate over nodes / edges and get all items that are selected. If have no state management set up, you can grab the nodes from the React Flow store like:
const selectedNodes = useStore(s => s.nodes.filter(n => n.selected))
Does this help @kevincrabbe ?
from xyflow.
Related Issues (20)
- The βHandleβ only indicates the type, but is used here as a value. HOT 3
- Version 11.11.3: onNodeClick Not Working with Touchpad Clicks
- onNodeDrag handler returns NaN as the position when dragging. HOT 3
- V12 Migration: Node type imported from @xyflow/react is missing positionAbsolute field HOT 3
- Dynamic positioning HOT 1
- V12 Migration: Nodes array missing provided order HOT 1
- Backgrounds and grid snapping are misaligned HOT 4
- If I have two ReactFlowProviders and some bacground elements, moving backroung on first moves it on later HOT 2
- any plan for education for lowest price for associated with reactflow pro ? HOT 1
- Autolayout Bug for Dagre algorithm HOT 2
- Is there any way to customize the connecting lines or display self-looping nodes better? HOT 3
- Why is it enlarged for no reason? HOT 4
- how can i set maxHeight dynamically when I resize the node HOT 1
- Need to disable the defalt zooming behaviour for the nodes
- The onNodeMouseEnter/Leave events do not cover the area of the NodeToolBar HOT 5
- React flow edges are not getting mounted on UI if browser zoom level is reduced to 80%, 90% or increased to 110% HOT 2
- isVisible support for Handle HOT 1
- Calculate viewport dimensions in `fitView` action
- Edges with `selectable` set to `false` are still included in lasso selections HOT 3
- Rotation function, custom connection handle, the connection line is too far away from the handle HOT 7
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 xyflow.