Opening the link to a table editor view for a table from a schema should select that schema
paarthmadan opened this issue · comments
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When you open the link to a table that's not in the public
schema in a new tab (ie. Cmd + Click
or Ctrl + Click
), the table editor shows the correct table contents but it doesn't change the schema accordingly, and therefore doesn't show it as selected in the left panel.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Assume you have a project where:
- There's more than 1 schema: ie.
public
andfoo
- And
foo
has tablefoo.table
- Change the schema dropdown to
foo
in the left panel. - Open the table in a new tab, by selecting
foo.table
right-clicking "Open in new tab" or usingCmd/Ctrl + Click
. - Observe that the contents of the table grid are correct, but the schema is incorrect as it shows
public
. - Observe that the selected table isn't present, because the list doesn't have the shown table.
Expected behavior
If you open the link https://supabase.com/dashboard/project/<project-id>/editor/<table-id>
and table-id
is a different schema than public, it should have that schema selected.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Browser: chrome
- Version of supabase-js: not relevant
- Version of Node.js: not relevant
Additional context
I can take this issue on, it seems pretty straightforward to fix. More or less have to update the selected schema for the TableEditorMenu
if the table currently being viewed has a schema that doesn't align with the current selected schema.
@paarthmadan Are you working on this fix, if not shall I do the fix?
Hi @Meyazhagan feel free to open a pull request for this issue 👍