Skip to content

fix: Removing node with edge instances#57

Merged
philippjfr merged 1 commit intomainfrom
delete_apply_on_edges
Mar 26, 2026
Merged

fix: Removing node with edge instances#57
philippjfr merged 1 commit intomainfrom
delete_apply_on_edges

Conversation

@hoxbro
Copy link
Copy Markdown
Collaborator

@hoxbro hoxbro commented Mar 24, 2026

Description

Fixes this raising an AttributeError when deleting Node A.

import panel as pn
import panel_reactflow as pr

# pn.extension("jsoneditor")

nodes = [
    pr.Node(id="a", position={"x": 0, "y": 0}, label="Node A"),
    pr.Node(id="b", position={"x": 250, "y": 0}, label="Node B"),
    pr.Node(id="c", position={"x": 125, "y": 150}, label="Node C"),
]

edges = [
    pr.Edge(id="e1", source="a", target="c"),
    pr.Edge(id="e2", source="b", target="c"),
]

flow = pr.ReactFlow(nodes=nodes, edges=edges, sizing_mode="stretch_both")

pn.Column(flow, sizing_mode="stretch_both").servable()

How Has This Been Tested?

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested all AI-generated content in my PR.
    • I take responsibility for all AI-generated content in my PR.

Tools and Models: Cursor + Sonnet 4.6

Checklist

  • Tests added and are passing

@hoxbro hoxbro force-pushed the delete_apply_on_edges branch from 8280a47 to 58a9ade Compare March 24, 2026 08:13
@philippjfr philippjfr merged commit c4f684a into main Mar 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants