File tree Expand file tree Collapse file tree 5 files changed +11
-12
lines changed
docs/enterprise/react_flow Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -85,19 +85,15 @@ def flow_example():
8585 return rx.box(
8686 rxe.flow(
8787 # Core flow components
88- rxe.flow.controls(), # Zoom and pan controls
89- rxe.flow.background(), # Grid background
90- rxe.flow.mini_map(), # Mini map for navigation
88+ rxe.flow.controls(),
89+ rxe.flow.background(),
90+ rxe.flow.mini_map(),
9191
9292 # Flow configuration
93+ default_nodes = FlowState.nodes,
94+ default_edges = FlowState.edges,
9395 nodes = FlowState.nodes,
9496 edges = FlowState.edges,
95- on_nodes_change = lambda node_changes : FlowState.set_nodes(
96- rxe.flow.util.apply_node_changes(FlowState.nodes, node_changes)
97- ),
98- on_edges_change = lambda edge_changes : FlowState.set_edges(
99- rxe.flow.util.apply_edge_changes(FlowState.edges, edge_changes)
100- ),
10197
10298 # Visual settings
10399 fit_view = True ,
Original file line number Diff line number Diff line change 22
33Edges connect nodes together in a flow. This page explains how to define, customize, and interact with edges in Reflex Flow.
44
5- ## The ` Edge ` Type
5+ ## The ** Edge** Type
66
77An edge is represented as a Python dictionary with the following fields:
88
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ def add_node_on_edge_drop():
103103 ),
104104 nodes = AddNodesOnEdgeDropState.nodes,
105105 edges = AddNodesOnEdgeDropState.edges,
106+ default_nodes = AddNodesOnEdgeDropState.nodes,
107+ default_edges = AddNodesOnEdgeDropState.edges,
106108 on_nodes_change = lambda changes : AddNodesOnEdgeDropState.set_nodes(
107109 rxe.flow.util.apply_node_changes(
108110 AddNodesOnEdgeDropState.nodes, changes
@@ -208,6 +210,8 @@ def connection_limit():
208210 rxe.flow.background(),
209211 nodes = ConnectionLimitState.nodes,
210212 edges = ConnectionLimitState.edges,
213+ default_nodes = ConnectionLimitState.nodes,
214+ default_edges = ConnectionLimitState.edges,
211215 on_nodes_change = lambda changes : ConnectionLimitState.set_nodes(
212216 rxe.flow.util.apply_node_changes(ConnectionLimitState.nodes, changes)
213217 ),
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ def interactive_flow():
6262 on_edges_change = lambda edge_changes : FlowState.set_edges(
6363 rxe.flow.util.apply_edge_changes(FlowState.edges, edge_changes)
6464 ),
65- on_connect = FlowState.on_connect,
6665 fit_view = True ,
6766
6867 attribution_position = " bottom-right" ,
Original file line number Diff line number Diff line change 22
33Nodes are the fundamental building blocks of a flow. This page explains how to define and customize nodes in Reflex Flow.
44
5- ## The ` Node ` Type
5+ ## The ** Node** Type
66
77A node is represented as a Python dictionary with the following fields:
88
You can’t perform that action at this time.
0 commit comments