goto API on DocumentEditor.
Overview
Thegoto method enables programmatic navigation to specific locations within a form. This is useful for:
- Guiding users to required fields after validation
- Implementing custom navigation flows
- Deep linking to specific form sections
- Auto-scrolling to specific fields
- Opening a specific table or collection row in its row form (modal)
- Focusing a specific cell within a table or collection row
Path-Based Navigation
Navigate using a slash-separated path string. Up to four segments are supported.
For row-level paths, the field must be a table or collection type. The
rowId must match an existing row’s ID in that field’s value; otherwise goto returns .failure.
For column-level paths, the columnId must match an existing visible column in the field; otherwise goto returns .failure (but still navigates to the row).
GotoConfig
Navigation behavior is configured viaGotoConfig. Pass it as the second argument to goto.
NavResponse
Thegoto method returns a NavResponse indicating success or failure.
Failure reasons include:
- Page does not exist
- Page is hidden (due to conditional logic)
- Field position does not exist
- Field is hidden (due to conditional logic)
- Field type is unsupported (
file,unknown) - Row is hidden
- Row does not exist
- Column is hidden
- Column does not exist
Page Change Events
Page changes triggered bygoto() are emitted through the onBlur and onFocus callbacks. When the user navigates from one page to another (either via goto() or manual navigation), the callbacks receive a ComponentEvent.PageEvent:
PageEvent Properties: