Skip to content

Commit 0962bcc

Browse files
authored
Remove default freeze on PK column in table editor (supabase#42636)
## Context Just removes the default column freeze behaviour on primary key columns in the table editor. Behaviour should still persist if freezing manually. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Updates** * Grid columns are no longer frozen based on primary key designation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 5b8ca1b commit 0962bcc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/studio/components/grid/utils/gridColumns.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import { AddColumn } from '../components/grid/AddColumn'
1919
import { ColumnHeader } from '../components/grid/ColumnHeader'
2020
import { SelectColumn } from '../components/grid/SelectColumn'
2121
import {
22+
isPendingAddRow,
2223
type ColumnType,
2324
type SupaColumn,
2425
type SupaRow,
2526
type SupaTable,
26-
isPendingAddRow,
2727
} from '../types'
2828
import {
2929
isArrayColumn,
@@ -72,7 +72,7 @@ export function getGridColumns(
7272
sortable: true,
7373
width: columnWidth,
7474
minWidth: COLUMN_MIN_WIDTH,
75-
frozen: x.isPrimaryKey || false,
75+
frozen: false,
7676
isLastFrozenColumn: false,
7777
renderHeaderCell: (props) => (
7878
<ColumnHeader

apps/studio/components/grid/utils/queueOperationUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { QueryClient } from '@tanstack/react-query'
2-
import { type Entity, isTableLike } from 'data/table-editor/table-editor-types'
2+
import { isTableLike, type Entity } from 'data/table-editor/table-editor-types'
33
import { tableRowKeys } from 'data/table-rows/keys'
44
import type { TableRowsData } from 'data/table-rows/table-rows-query'
55
import type { Dictionary } from 'types'
66

7-
import { PendingAddRow, PendingDeleteRow, SupaRow, isPendingAddRow } from '../types'
7+
import { isPendingAddRow, PendingAddRow, PendingDeleteRow, SupaRow } from '../types'
88
import {
99
EditCellContentOperation,
1010
NewQueuedOperation,

0 commit comments

Comments
 (0)