Static Value pada Dynamic Column JSON adalah konsep di mana beberapa kolom atau nilai dalam struktur JSON tetap konstan (tidak berubah), sementara kolom lainnya dapat berubah secara dinamis berdasarkan data atau input yang diterima. contoh dalam menginisiasi âvalueâ untuk menampilkan warna sesuai value pada âdynamicFormâ seperti ini:
Copy "dynamicForm" : [
{
"fieldName" : "id_unit" ,
"fieldLabel" : "Department" ,
"size" : 6 ,
"isHidden" : true
} ,
{
"fieldName" : "nameInventory" ,
"fieldLabel" : "Item Inventory Location" ,
"size" : 6 ,
"rules" : {
"required" : true
}
} ,
{
"fieldName" : "descInventory" ,
"fieldLabel" : "Description" ,
"size" : 6
} ,
{
"fieldName" : "color" ,
"size" : 6 ,
"type" : "dropdown" ,
"dataFrom" : {
"value" : [
{
"value" : "primary" ,
"label" : "primary" ,
"icon" : "material:radio_button_checked" ,
"class" : "text-primary bg-primary"
} ,
{
"value" : "warning" ,
"label" : "warning" ,
"icon" : "material:radio_button_checked" ,
"class" : "text-warning bg-warning"
} ,
{
"value" : "success" ,
"label" : "success" ,
"icon" : "material:radio_button_checked" ,
"class" : "text-success bg-success"
} ,
{
"value" : "info" ,
"label" : "info" ,
"icon" : "material:radio_button_checked" ,
"class" : "text-info bg-info"
} ,
{
"value" : "danger" ,
"label" : "danger" ,
"icon" : "material:radio_button_checked" ,
"class" : "text-danger bg-danger"
} ,
{
"value" : "secondary" ,
"label" : "secondary" ,
"icon" : "material:radio_button_checked" ,
"class" : "text-secondary bg-secondary"
}
]
}
} ,
{
"fieldName" : "icon" ,
"size" : 6 ,
"type" : "icon"
}
],
.....