mirror of
https://github.com/chartdb/chartdb.git
synced 2026-05-12 15:19:40 -05:00
Check unique attribute upon toggling the primary key for a field
This commit is contained in:
+2
@@ -95,6 +95,7 @@ export const TableField: React.FC<TableFieldProps> = ({
|
||||
pressed={field.primaryKey}
|
||||
onPressedChange={(value) =>
|
||||
updateField({
|
||||
unique: value,
|
||||
primaryKey: value,
|
||||
})
|
||||
}
|
||||
@@ -128,6 +129,7 @@ export const TableField: React.FC<TableFieldProps> = ({
|
||||
</Label>
|
||||
<Checkbox
|
||||
checked={field.unique}
|
||||
disabled={field.primaryKey}
|
||||
onCheckedChange={(value) =>
|
||||
updateField({
|
||||
unique: !!value,
|
||||
|
||||
Reference in New Issue
Block a user