Skip to content

Commit 13a933d

Browse files
committed
patch flow docs
1 parent 3d54390 commit 13a933d

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

docs/enterprise/react_flow/basic_flow.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff 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,

docs/enterprise/react_flow/edges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Edges 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

77
An edge is represented as a Python dictionary with the following fields:
88

docs/enterprise/react_flow/examples.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
),

docs/enterprise/react_flow/interactivity.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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",

docs/enterprise/react_flow/nodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Nodes 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

77
A node is represented as a Python dictionary with the following fields:
88

0 commit comments

Comments
 (0)