...
| Code Block | ||
|---|---|---|
| ||
columns : [
{key : 'key', label : 'Columns'}, // first column will used to populate row label
{key : 'value', label : 'Value', required: 'true'},
{key : 'label', label : 'Label', required: 'true'},
{key : 'width', label : 'Width', options:[
{value : '10%', label : '10%'},
{value : '20%', label : '20%'},
{value : '30%', label : '20%'},
{value : '40%', label : '20%'}
]}
],
rows : [
{label : 'Username', required: 'true'},
{label : 'Status'},
{label : 'Message'},
{label : 'Date'}
],
value : [
{label : 'Username'},
{label : 'Status'},
{label : 'Message', width : '20%'},
{label : 'Date', value : 'dateCreated'}
] |
- 参阅 依赖关系字段属性 以获取额外的属性,以根据其他字段值显示/隐藏此字段。
- 参阅 检索插件中的属性值 - 网格字段 中如何在插件代码中使用此字段类型的值。
- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Grid Field on how to use the value of this field type in the plugin code.
Grid
- type : 'Grid'
- columns : A JSON array of 'column' JSON objects which has 2 mandatory 'key' & 'label' attributes and 2 optional 'required' & 'options' attribute.
- key : Identifier of this column.
- label : Label of the column header
- options : Optional, an array of JSON object with 'value' and 'label' attributes. A column with 'options' attribute will display the input field as select box.
- required : Optional, 'true' or 'false'. A grid cell with the 'required' attribute of 'row' and 'column' set to 'true' value is a mandatory field.
value : A JSON array of grid row values in JSON Object format with all the 'key' attribute of 'column' object used as attribute.
Code Block language js columns : [ {key : 'value', label : 'Value', required: 'true'}, {key : 'label', label : 'Label', required: 'true'}, {key : 'width', label : 'Width', options:[ {value : '10%', label : '10%'}, {value : '20%', label : '20%'}, {value : '30%', label : '20%'}, {value : '40%', label : '20%'} ]} ], value : [ {label : 'Username', value : 'username'}, {label : 'Status', value : 'status'}, {label : 'Message', value : 'message', width : '20%'}, {label : 'Date', value : 'dateCreated'} ]- Refer to Dependency Field Attributes for extra attributes to do show/hide this field based on other field value.
- Refer to Retrieve Properties Value in Plugin - Grid Field on how to use the value of this field type in the plugin code.
...
