Lista
Para mostrar una lista, se utiliza la lista de componentes.
const listJSON = {
"component": "list", //tells the component name
"data": "@languages", // an array of list items
},
En este caso, el lenguaje es una simple matriz de cadenas. languages = ["English", "Hindi", "French"]
Si queremos procesar una lista de objetos, podemos especificar la estructura utilizando la configuración del elemento.
const listJSON = {
"component": "list", //tells the component name
"data": "@projects", // an array of list items
"itemConfig": { // used to define the structure of the list items.
"component": "widget",
"id": "checkbox_label"
}
},
Normalmente itemConfig es un widget
. Para obtener más información sobre los widgets, ve a Widgets
La lista procesada tendrá este aspecto:
recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178