You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**WHAT this workflow produces:** Four components that work together:
19
+
1.**EditCard** - Wrapper with title and "New" button (navigates to NewPage)
20
+
2.**EditDataTable** - Server-paginated table with edit/delete actions (edit navigates to EditPage)
21
+
3.**NewPage** - Standalone page for creating new items
22
+
4.**EditPage** - Standalone page for editing existing items
23
+
24
+
**Decision Rules:**
25
+
-**Props from router are strings:** Route params are always strings. Create `...AsNumber` computed for API calls.
26
+
-**Where to put components:** EditCard/EditDataTable go in `components/{model-plural}/`. NewPage/EditPage go in `pages/{parent-path}/{model-plural}/`.
27
+
-**Parent ID handling:** For child entities, NewPage receives parentId. EditPage may only need the modelId (depends on whether you need parent context).
28
+
-**returnTo vs fallbackRoute:** Use returnTo prop when the caller specifies where to go back. Use fallbackRoute when determining from route history.
0 commit comments