Allow editing old configs

This commit is contained in:
Adria Navarro 2024-06-04 16:50:12 +02:00
parent 47b77d6744
commit ac9f5d5d1e
1 changed files with 5 additions and 2 deletions

View File

@ -49,12 +49,15 @@
const requiredTooltip = isRequired && "Required columns must be writable" const requiredTooltip = isRequired && "Required columns must be writable"
const editEnabled =
!isRequired ||
columnToPermissionOptions(c) !== PERMISSION_OPTIONS.WRITABLE
const options = [ const options = [
{ {
icon: "Edit", icon: "Edit",
value: PERMISSION_OPTIONS.WRITABLE, value: PERMISSION_OPTIONS.WRITABLE,
tooltip: requiredTooltip || "Writable", tooltip: (!editEnabled && requiredTooltip) || "Writable",
disabled: isRequired, disabled: !editEnabled,
}, },
] ]
if ($datasource.type === "viewV2") { if ($datasource.type === "viewV2") {