Check unique attribute upon toggling the primary key for a field

This commit is contained in:
pamarthiabhinav
2024-08-25 18:29:57 +05:30
parent 171591d730
commit fe227df9c6
@@ -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,