Skip to content

Commit b8b3eab

Browse files
committed
fix(tables): align reference config with column registry
1 parent aca3c72 commit b8b3eab

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ vi.mock('@/lib/table/column-types', () => ({
7373
{ id: 'select', label: 'Select', icon: () => null },
7474
{ id: 'reference', label: 'Reference', icon: () => null },
7575
],
76-
columnTypeOf: (type: string) => ({ supportsUnique: type !== 'select' }),
76+
columnTypeById: (type: string) => ({ supportsUnique: type !== 'select' }),
7777
}))
7878

7979
vi.mock('@/hooks/queries/tables', () => ({

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { X } from '@sim/emcn/icons'
1616
import { toError } from '@sim/utils/errors'
1717
import { findValidationIssue, isValidationError } from '@/lib/api/client/errors'
1818
import type { ColumnDefinition, SelectOption } from '@/lib/table'
19-
import { columnTypeOf } from '@/lib/table/column-types'
19+
import { columnTypeById } from '@/lib/table/column-types'
2020
import {
2121
DEFAULT_CURRENCY_CODE,
2222
getCurrencyOptions,
@@ -164,7 +164,7 @@ function ColumnConfigBody({
164164
const wantsOptions = isSelectType(typeInput)
165165
const wantsCurrency = typeInput === 'currency'
166166
const wantsReference = typeInput === 'reference'
167-
const supportsUnique = columnTypeOf(typeInput).supportsUnique
167+
const supportsUnique = columnTypeById(typeInput).supportsUnique
168168
const { data: workspaceTables = [] } = useTablesList(workspaceId, 'active', {
169169
enabled: wantsReference,
170170
})

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type { ColumnConfig, ColumnConfigurationMetadata } from './column-config-sidebar'
1+
export type { ColumnConfig } from './column-config-sidebar'
22
export { ColumnConfigSidebar } from './column-config-sidebar'
33
export {
44
COLUMN_TYPE_OPTIONS,

0 commit comments

Comments
 (0)