You can connect multiple dashboard pages in your CLI project using the Dashboard SDK's navigate() and observeState() methods. A common use case is the master-detail pattern: a list page that displays items and a detail page that shows information about a selected item.
To navigate between dashboard pages:
@wix/dashboard package installed in your project.Find the target dashboard page's component ID in its extension.ts file. This is the id field:
On the source page, use dashboard.navigate() to send the user to the target page. Pass data through the relativeUrl parameter:
On the target page, use dashboard.observeState() to read the data passed through the URL. The callback fires when the page initializes and whenever the state updates.
The first parameter (pageParams) contains a location object with the pathname passed via relativeUrl:
Use the retrieved ID to fetch and display the item's data from your data source.