Files
supabase/apps/studio/components
Vaibhav ff3f733dd1 fix: foreign key shortcut (#45761)
## TL:DR 

`cmd + enter` in the foreign key dialog was also saving the parent
column too early and dropping the foreign key relation
now this fix stops the parent save shortcut while the foreign key dialog
is open so the relation saves properly

## before: 


https://github.com/user-attachments/assets/5a8040a8-d527-424b-8df8-14a794a30c43

## after: 


https://github.com/user-attachments/assets/c2f058e2-e2dd-4730-b7fb-a63b181f2ac8

## ref: 
- closes https://github.com/supabase/supabase/issues/45759

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved foreign key selector state management to properly reset when
the column editor becomes visible, ensuring clean state between editing
sessions.
* Enhanced action bar visibility logic to only display when the column
editor is active and the foreign key selector is closed, providing a
clearer editing interface.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45761)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-11 07:11:05 -06:00
..

Writing components

Where to create your components

  • For components that declare the general structure and layout of a page:
    • /components/layouts/xxx
  • For components that are tightly coupled to a specific interface:
    • /components/interfaces/xxx
  • For components that are meant to be reusable across multiple pages:
    • /components/ui/xxx
  • Note: We're gradually moving files out of the to-be-cleaned folder into the respective folders as we refactor

Component structure

  • If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an index.tsx as an entry point
  • Otherwise it can just be a file on its own
  • For example:
    • components/ui
      - SampleComponentA
        - SampleComponentA.tsx
        - SampleComponentA.constants.ts
        - SampleComponentA.utils.ts
        - SampleComponentA.types.ts
        - index.ts
      - SampleComponentB.tsx
      

Template for building components


// Declare the prop types of your component
interface ComponentAProps {
  sampleProp: string
}

// Name your component accordingly
const ComponentA = ({ sampleProp }: ComponentAProps) => {
  return <div>ComponentA: {sampleProp}</div>
}

export default ComponentA