# Ejemplo de código de Tabla. DESY. Sistema de diseño del Gobierno de Aragón. ## Componentes Índice de páginas Componentes # Tabla Datos Componente para ordenar valores relacionados en filas y columnas. # Treegrid Mostrar parámetros ## Parámetros Nunjucks del componente: "Treegrid" ```yaml params: - name: rows type: object required: true description: table rows in treegrid. params: - name: level type: integer required: false description: Specify the hierarchical level of the row. Level 1 is the top level. This will add the appropriate aria-level attribute to the row. - name: posinset type: integer required: false description: Specify the position of the row within its current level, starting at 1. This will add the appropriate aria-posinset attribute to the row. - name: setsize type: integer required: false description: Specify the number of rows within the current level. This will add the appropriate aria-setsize attribute to the row. - name: expanded type: boolean required: false description: If true, row sub will be expanded. - name: cells type: array required: false description: Provide cells for the row. params: - name: text type: string required: true description: If `html` is set, this is not required. Text for cells in table rows. If `html` is provided, the `text` argument will be ignored. - name: html type: string required: true description: If `text` is set, this is not required. HTML for cells in table rows. If `html` is provided, the `text` argument will be ignore - name: classes type: string required: false description: Classes to add to the table cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table row. - name: head type: array required: false description: Array of table head cells. params: - name: text type: string required: false description: If `html` is set, this is not required. Text for table head cells. If `html` is provided, the `text` argument will be ignored. - name: html type: string required: false description: If `text` is set, this is not required. HTML for table head cells. If `html` is provided, the `text` argument will be ignore - name: classes type: string required: false description: Classes to add to the table head cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table cell. - name: foot type: array required: false description: Array of table tfoot cells. params: - name: text type: string required: false description: If `html` is set, this is not required. Text for table tfoot cells. If `html` is provided, the `text` argument will be ignored. - name: html type: string required: false description: If `text` is set, this is not required. HTML for table tfoot cells. If `html` is provided, the `text` argument will be ignore - name: classes type: string required: false description: Classes to add to the table tfoot cell. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table cell. - name: caption type: string required: false description: Caption text - name: captionClasses type: string required: false description: Classes for caption text size. Classes should correspond to the available typography heading classes. - name: firstCellIsHeader type: boolean required: false description: If set to true, first cell in table row will be a TH instead of a TD. - name: wrapper type: object required: false description: Options for a wrapper div outside the table params: - name: classes type: string required: false description: Classes to add to the wrapper (e.g. to show an horizontal scrollbar it there are many columns or in mobile) - name: attributes type: object required: false description: HTML attributes to add to the wrapper div. For accessibility it needs tabindex=0, role=section and aria-label or aria-labelledby. - name: classes type: string required: false description: Classes to add to the table container. - name: attributes type: object required: false description: HTML attributes (for example data attributes) to add to the table container. accessibilityCriteria: | ## Las tablas deben: 1. Debe tener al menos una celda de encabezado (TH) en las filas o columnas exteriores. 2. Si la tabla tiene más de un nivel de encabezado (si hay elementos th en dos filas o en dos columnas) las celdas de datos y de encabezado deben estar asociadas con los atributos id (en los th) /headers (en los td). 3. El título de la tabla debe estar marcado como 4. La primera fila de la tabla no puede tener todas las celdas unidas, o se interpreta que se está simulando un caption. 5. Después de un encabezado (h1, h2…) no puede ir directamente una tabla, o se entiende que se está usando el encabezado para lo que debería ser el 6. La tabla debe tener una descripción especialmente si la tabla es grande o compleja, tiene varios niveles de encabezados, tiene totales o enlaces, etc. La descripción intenta suplir la primera impresión que tienen de la tabla las personas que pueden verla, por ejemplo, vemos que en la última columna hay enlaces o en la última fila hay totales. Como en HTML 5 ya no está admitido el atributo summary en las tablas, lo que se hace es poner la descripción en un párrafo antes de la tabla y asociarlo a la tabla con aria-describedby (así se evita también el error 5). El caption y la descripción no deben ser iguales. 7. El validador del OAW dará error si hay tablas de una única columna y 3 o más filas con texto menor de 150 caracteres, pues considerará que se está simulando una lista. ``` ### Treegrid por defecto [#](#treegrid-por-defecto) El Treegrid usa una tabla que se considera tabla compleja a nivel de accesibilidad. Así que tendría que tener una descripción con un details asociado a la tabla con el atributo aria-describedby. Mostrar códigodel ejemplo: Treegrid por defecto #### Contenido Nunjucks macro HTML ##### Nunjucks macro ```js {% from "components/treegrid/_macro.treegrid.njk" import componentTreegrid %} {{ componentTreegrid({ "caption": "Caption de la treegrid", "captionClasses": "sr-only mb-base font-bold text-left text-lg", "head": [ { "text": "Documento" }, { "text": "Importe", "classes": "lg:text-right" }, { "text": "Fecha" }, { "text": "Acciones" } ], "rows": [ { "level": 1, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "A0001", "attributes": { "id": "A0001" } }, { "text": "3.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 1, "setsize": 3, "cells": [ { "text": "A0001-1", "attributes": { "id": "A0001-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 2, "setsize": 3, "expanded": false, "cells": [ { "text": "A0001-2", "attributes": { "id": "A0001-2" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "cells": [ { "text": "A0001-2-1", "attributes": { "id": "A0001-2-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 3, "setsize": 3, "expanded": false, "cells": [ { "text": "A0001-3", "attributes": { "id": "A0001-3" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "A0001-3-1", "attributes": { "id": "A0001-3-1" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 1, "setsize": 2, "cells": [ { "text": "A0001-3-1-1", "attributes": { "id": "A0001-3-1-1" } }, { "text": "95€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 2, "setsize": 2, "cells": [ { "text": "A0001-3-1-2", "attributes": { "id": "A0001-3-1-2" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] } ], "wrapper": { "classes": "relative overflow-x-auto pb-base focus:outline-hidden focus:shadow-outline-black", "attributes": { "tabindex": "0", "role": "region", "aria-label": "Treegrid con scroll del ejemplo Treegrid con wrapper" } }, "classes": "w-full", "attributes": { "id": "treegrid", "aria-describedby": "treegrid-desc" } }) }} ``` ##### HTML ```html
Caption de la treegrid
Documento Importe Fecha Acciones
A0001-1 1.000,00€ 05/01/2024 Ver
A0001-2-1 1.000,00€ 05/01/2024 Ver
A0001-3-1-1 95€ 15/01/2024 Ver
A0001-3-1-2 5.000,00€ 15/01/2024 Ver
``` ### Treegrid con tfoot [#](#treegrid-con-tfoot) El Treegrid usa una tabla que se considera tabla compleja a nivel de accesibilidad. Así que tendría que tener una descripción con un details asociado a la tabla con el atributo aria-describedby. Mostrar códigodel ejemplo: Treegrid con tfoot #### Contenido Nunjucks macro HTML ##### Nunjucks macro ```js {% from "components/treegrid/_macro.treegrid.njk" import componentTreegrid %} {{ componentTreegrid({ "caption": "Caption de la treegrid", "captionClasses": "sr-only mb-base font-bold text-left text-lg", "head": [ { "text": "Documento" }, { "text": "Importe", "classes": "lg:text-right" }, { "text": "Fecha" }, { "text": "Acciones" } ], "rows": [ { "level": 1, "posinset": 1, "setsize": 1, "expanded": true, "cells": [ { "text": "B0001", "attributes": { "id": "B0001" } }, { "text": "3.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 1, "setsize": 3, "cells": [ { "text": "B0001-1", "attributes": { "id": "B0001-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 2, "setsize": 3, "expanded": false, "cells": [ { "text": "B0001-2", "attributes": { "id": "B0001-2" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "cells": [ { "text": "B0001-2-1", "attributes": { "id": "B0001-2-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 3, "setsize": 3, "expanded": false, "cells": [ { "text": "B0001-3", "attributes": { "id": "B0001-3" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "B0001-3-1", "attributes": { "id": "B0001-3-1" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 1, "setsize": 2, "cells": [ { "text": "B0001-3-1-1", "attributes": { "id": "B0001-3-1-1" } }, { "text": "95€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 2, "setsize": 2, "cells": [ { "text": "B0001-3-1-2", "attributes": { "id": "B0001-3-1-2" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] } ], "foot": [ { "text": "Suma", "classes": "uppercase" }, { "text": "10.045€", "classes": "lg:text-right" }, { "text": "" }, { "text": "" } ], "wrapper": { "classes": "relative overflow-x-auto pb-base focus:outline-hidden focus:shadow-outline-black", "attributes": { "tabindex": "0", "role": "region", "aria-label": "Treegrid con scroll del ejemplo Treegrid con wrapper" } }, "classes": "w-full", "attributes": { "id": "treegrid-B", "aria-describedby": "treegrid-B-desc" } }) }} ``` ##### HTML ```html
Caption de la treegrid
Documento Importe Fecha Acciones
B0001 3.000,00€ 05/01/2024 Ver
B0001-1 1.000,00€ 05/01/2024 Ver
B0001-2-1 1.000,00€ 05/01/2024 Ver
B0001-3-1-1 95€ 15/01/2024 Ver
B0001-3-1-2 5.000,00€ 15/01/2024 Ver
Suma 10.045€
``` ### Treegrid con caption visible [#](#treegrid-con-caption-visible) El Treegrid usa una tabla que se considera tabla compleja a nivel de accesibilidad. Así que tendría que tener una descripción con un details asociado a la tabla con el atributo aria-describedby. Mostrar códigodel ejemplo: Treegrid con caption visible #### Contenido Nunjucks macro HTML ##### Nunjucks macro ```js {% from "components/treegrid/_macro.treegrid.njk" import componentTreegrid %} {{ componentTreegrid({ "caption": "Documentos contables", "captionClasses": "mb-base font-bold text-left text-lg", "head": [ { "text": "Documento" }, { "text": "Importe", "classes": "lg:text-right" }, { "text": "Fecha" }, { "text": "Acciones" } ], "rows": [ { "level": 1, "posinset": 1, "setsize": 1, "expanded": true, "cells": [ { "text": "C0001", "attributes": { "id": "C0001" } }, { "text": "3.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 1, "setsize": 3, "cells": [ { "text": "C0001-1", "attributes": { "id": "C0001-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 2, "setsize": 3, "expanded": false, "cells": [ { "text": "C0001-2", "attributes": { "id": "C0001-2" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "cells": [ { "text": "C0001-2-1", "attributes": { "id": "C0001-2-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 3, "setsize": 3, "expanded": false, "cells": [ { "text": "C0001-3", "attributes": { "id": "C0001-3" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "C0001-3-1", "attributes": { "id": "C0001-3-1" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 1, "setsize": 2, "cells": [ { "text": "C0001-3-1-1", "attributes": { "id": "C0001-3-1-1" } }, { "text": "95€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 2, "setsize": 2, "cells": [ { "text": "C0001-3-1-2", "attributes": { "id": "C0001-3-1-2" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] } ], "wrapper": { "classes": "relative overflow-x-auto pb-base focus:outline-hidden focus:shadow-outline-black", "attributes": { "tabindex": "0", "role": "region", "aria-label": "Treegrid con scroll del ejemplo Treegrid con wrapper" } }, "classes": "w-full", "attributes": { "id": "treegrid-B", "aria-describedby": "treegrid-B-desc" } }) }} ``` ##### HTML ```html
Documentos contables
Documento Importe Fecha Acciones
C0001 3.000,00€ 05/01/2024 Ver
C0001-1 1.000,00€ 05/01/2024 Ver
C0001-2-1 1.000,00€ 05/01/2024 Ver
C0001-3-1-1 95€ 15/01/2024 Ver
C0001-3-1-2 5.000,00€ 15/01/2024 Ver
``` ### Treegrid con primera celda como header [#](#treegrid-con-primera-celda-como-header) El Treegrid usa una tabla que se considera tabla compleja a nivel de accesibilidad. Así que tendría que tener una descripción con un details asociado a la tabla con el atributo aria-describedby. Mostrar códigodel ejemplo: Treegrid con primera celda como header #### Contenido Nunjucks macro HTML ##### Nunjucks macro ```js {% from "components/treegrid/_macro.treegrid.njk" import componentTreegrid %} {{ componentTreegrid({ "firstCellIsHeader": true, "caption": "Caption de la treegrid", "captionClasses": "sr-only mb-base font-bold text-left text-lg", "head": [ { "text": "Documento" }, { "text": "Importe", "classes": "lg:text-right" }, { "text": "Fecha" }, { "text": "Acciones" } ], "rows": [ { "level": 1, "posinset": 1, "setsize": 1, "expanded": true, "cells": [ { "text": "E0001", "attributes": { "id": "E0001" } }, { "text": "3.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 1, "setsize": 3, "cells": [ { "text": "E0001-1", "attributes": { "id": "E0001-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 2, "setsize": 3, "expanded": false, "cells": [ { "text": "E0001-2", "attributes": { "id": "E0001-2" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "cells": [ { "text": "E0001-2-1", "attributes": { "id": "E0001-2-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 3, "setsize": 3, "expanded": false, "cells": [ { "text": "E0001-3", "attributes": { "id": "E0001-3" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "E0001-3-1", "attributes": { "id": "E0001-3-1" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 1, "setsize": 2, "cells": [ { "text": "E0001-3-1-1", "attributes": { "id": "E0001-3-1-1" } }, { "text": "95€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 2, "setsize": 2, "cells": [ { "text": "E0001-3-1-2", "attributes": { "id": "E0001-3-1-2" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] } ], "wrapper": { "classes": "relative overflow-x-auto pb-base focus:outline-hidden focus:shadow-outline-black", "attributes": { "tabindex": "0", "role": "region", "aria-label": "Treegrid con scroll del ejemplo Treegrid con wrapper" } }, "classes": "w-full", "attributes": { "id": "treegrid", "aria-describedby": "treegrid-desc" } }) }} ``` ##### HTML ```html
Caption de la treegrid
Documento Importe Fecha Acciones
E0001 3.000,00€ 05/01/2024 Ver
E0001-1 1.000,00€ 05/01/2024 Ver
E0001-2-1 1.000,00€ 05/01/2024 Ver
E0001-3-1-1 95€ 15/01/2024 Ver
E0001-3-1-2 5.000,00€ 15/01/2024 Ver
``` ### Treegrid con 15 niveles de profundidad [#](#treegrid-con-15-niveles-de-profundidad) Ejemplo de Treegrid con 15 niveles de anidación. Mostrar códigodel ejemplo: Treegrid con 15 niveles de profundidad #### Contenido Nunjucks macro HTML ##### Nunjucks macro ```js {% from "components/treegrid/_macro.treegrid.njk" import componentTreegrid %} {{ componentTreegrid({ "caption": "Caption de la treegrid con 15 niveles", "captionClasses": "sr-only mb-base font-bold text-left text-lg", "head": [ { "text": "Documento" }, { "text": "Importe", "classes": "lg:text-right" }, { "text": "Fecha" }, { "text": "Acciones" } ], "rows": [ { "level": 1, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001", "attributes": { "id": "F0001" } }, { "text": "100 €", "classes": "lg:text-right" }, { "text": "01/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1", "attributes": { "id": "F0001-1" } }, { "text": "200 €", "classes": "lg:text-right" }, { "text": "02/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1", "attributes": { "id": "F0001-1-1" } }, { "text": "300 €", "classes": "lg:text-right" }, { "text": "03/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1", "attributes": { "id": "F0001-1-1-1" } }, { "text": "400 €", "classes": "lg:text-right" }, { "text": "04/01/2024" }, { "html": "Ver" } ] }, { "level": 5, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1" } }, { "text": "500 €", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 6, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1" } }, { "text": "600 €", "classes": "lg:text-right" }, { "text": "06/01/2024" }, { "html": "Ver" } ] }, { "level": 7, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1" } }, { "text": "700 €", "classes": "lg:text-right" }, { "text": "07/01/2024" }, { "html": "Ver" } ] }, { "level": 8, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1" } }, { "text": "800 €", "classes": "lg:text-right" }, { "text": "08/01/2024" }, { "html": "Ver" } ] }, { "level": 9, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1" } }, { "text": "900 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 10, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1-1" } }, { "text": "1000 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 11, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1-1-1" } }, { "text": "1100 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 12, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1-1-1-1" } }, { "text": "1200 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 13, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1-1-1-1-1" } }, { "text": "1300 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 14, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1-1-1-1-1-1" } }, { "text": "1400 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 15, "posinset": 1, "setsize": 1, "cells": [ { "text": "F0001-1-1-1-1-1-1-1-1-1-1-1-1-1-1", "attributes": { "id": "F0001-1-1-1-1-1-1-1-1-1-1-1-1-1-1" } }, { "text": "1500 €", "classes": "lg:text-right" }, { "text": "09/01/2024" }, { "html": "Ver" } ] }, { "level": 1, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0002", "attributes": { "id": "F0002" } }, { "text": "3.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 1, "setsize": 3, "cells": [ { "text": "F0002-1", "attributes": { "id": "F0002-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 2, "setsize": 3, "expanded": false, "cells": [ { "text": "F0002-2", "attributes": { "id": "F0002-2" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "cells": [ { "text": "F0002-2-1", "attributes": { "id": "F0002-2-1" } }, { "text": "1.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 2, "posinset": 3, "setsize": 3, "expanded": false, "cells": [ { "text": "F0002-3", "attributes": { "id": "F0002-3" } }, { "text": "2.000,00€", "classes": "lg:text-right" }, { "text": "05/01/2024" }, { "html": "Ver" } ] }, { "level": 3, "posinset": 1, "setsize": 1, "expanded": false, "cells": [ { "text": "F0002-3-1", "attributes": { "id": "F0002-3-1" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 1, "setsize": 2, "cells": [ { "text": "F0002-3-1-1", "attributes": { "id": "F0002-3-1-1" } }, { "text": "95€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] }, { "level": 4, "posinset": 2, "setsize": 2, "cells": [ { "text": "F0002-3-1-2", "attributes": { "id": "F0002-3-1-2" } }, { "text": "5.000,00€", "classes": "lg:text-right" }, { "text": "15/01/2024" }, { "html": "Ver" } ] } ], "wrapper": { "classes": "relative overflow-x-auto pb-base focus:outline-hidden focus:shadow-outline-black", "attributes": { "tabindex": "0", "role": "region", "aria-label": "Treegrid con scroll del ejemplo Treegrid con wrapper" } }, "classes": "w-full", "attributes": { "id": "treegrid-9", "aria-describedby": "treegrid-9-desc" } }) }} ``` ##### HTML ```html
Caption de la treegrid con 15 niveles
Documento Importe Fecha Acciones
F0001-1-1-1-1-1-1-1-1-1-1-1-1-1-1 1500 € 09/01/2024 Ver
F0002-1 1.000,00€ 05/01/2024 Ver
F0002-2-1 1.000,00€ 05/01/2024 Ver
F0002-3-1-1 95€ 15/01/2024 Ver
F0002-3-1-2 5.000,00€ 15/01/2024 Ver
```