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
{{ message }}
Repository navigation
Open the referenced row from a foreign key on iPhone and iPad #3636
On iPhone and iPad a foreign key value can only be previewed, not followed.
The row screen and the table list show a foreign key value with a table.column link (apple/TableProMobile/TableProMobile/Views/RowDetailView.swift:243, apple/TableProMobile/TableProMobile/Views/DataBrowserView.swift:366).
The link opens FKPreviewView, a sheet that lists the referenced row's columns as read-only text (apple/TableProMobile/TableProMobile/Views/Components/FKPreviewView.swift:35). ios/index.mdx describes it as "A foreign key value previews the row it points at."
From that sheet the user cannot open the referenced table, edit the referenced row, or follow that row's own foreign keys. Reaching it means closing the sheet, finding the table in the list, and typing a filter by hand.
On the Mac, the foreign key arrow opens the referenced table filtered to the matching row, and the preview is a second option (features/data-grid.mdx, Foreign keys).
Proposed solution
Add Open Table to the preview sheet. It opens the referenced table in the table browser, filtered to the referenced column equal to the value, with the matching row open on the row screen, so it can be edited there under the connection's Safe Mode.
In the preview, a value that is itself a foreign key is a link too, and following it pushes the next row onto the same stack, with Back returning one step.
Keep the preview as the first tap, since it is the quick look a phone needs; Open Table is one more tap.
Show the referenced table's name in the sheet's title, as today, and the schema when it differs from the current one.
Done means: from an orders row, tapping its customer_id link and then Open Table lands on customers filtered to that id, with the row ready to edit.
Alternatives considered
Close the preview, open the referenced table from the list, and add a filter on the key column by hand.
Activity