Skip to content

Commit b21c4df

Browse files
fix(table): meta-cell drag-leave flicker guard + plumb unique on create
1 parent 7c97335 commit b21c4df

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ function ColumnConfigBody({
106106

107107
try {
108108
if (config.mode === 'create') {
109-
await addColumn.mutateAsync({ name: trimmedName, type: typeInput })
109+
await addColumn.mutateAsync({
110+
name: trimmedName,
111+
type: typeInput,
112+
...(uniqueInput ? { unique: true } : {}),
113+
})
110114
toast.success(`Added "${trimmedName}"`)
111115
onClose()
112116
return

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ export function WorkflowGroupMetaCell({
327327
const th = e.currentTarget as HTMLElement
328328
const related = e.relatedTarget as Node | null
329329
if (related && th.contains(related)) return
330+
if (related && related instanceof Element && related.closest('th')) return
330331
onDragLeave?.()
331332
},
332333
[onDragLeave]

0 commit comments

Comments
 (0)