Skip to content

Conversation

@KumarManuSaraswat
Copy link

Summary

This PR fixes an issue where the "Relationships" list in the Table Inspector would not update immediately after creating a new relationship, requiring a manual page refresh.

Fixes #4893

Changes Made

  • Modified mathesar_ui/src/components/LinksContent.svelte.
  • Added an event listener on:success to the LinkTableModal component.
  • Implemented a handler that calls invalidateAll() from $app/navigation to force SvelteKit to reload the table data immediately after a relationship is successfully created.

How to Test

  1. Open any table in the Data Explorer.
  2. Open the Inspector (right sidebar) and expand the Relationships section.
  3. Click Create Relationship.
  4. Create a link to another table and click Save.
  5. Observe: The new relationship should appear in the list instantly without refreshing the page.

Checklist

  • I have tested this locally and verified the UI updates instantly.
  • I have included the issue number above.

This is my first PR in the Mathesar repo and I am a newbie so If I missed any points or if there is any guideline I didn't follow then please guide me.
I will improve
Thank you!

@KumarManuSaraswat
Copy link
Author

I haven't made any changes to the code in overall so why are the checks failing ?

Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @KumarManuSaraswat you're seeing linting failing because there are lint errors in the LinksContent.svelte file you edited. You can see these directly in the GitHub diff UI:

https://github.com/mathesar-foundation/mathesar/pull/5024/files

Please fix these by running npm run lint in the mathesar_ui directory locally and addressing the errors.

@Anish9901 Anish9901 marked this pull request as draft November 26, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Displayed table relationships do not update after adding a new relationship

2 participants