{%- set static = static ?? false %} {%- set fullWidth = fullWidth ?? true %} {%- set cols = cols ?? [] %} {%- set rows = rows ?? [] %} {%- set initJs = not static and (initJs ?? true) -%} {%- set minRows = minRows ?? null %} {%- set maxRows = maxRows ?? null %} {%- set totalRows = rows|length %} {%- set staticRows = static or (staticRows ?? false) or (minRows == 1 and maxRows == 1 and totalRows == 1) %} {%- set fixedRows = not staticRows and (minRows and minRows == maxRows and minRows == totalRows) %} {%- set describedBy = describedBy ?? null %} {% if not static %} {{ hiddenInput(name, '') }} {% endif %} {% macro cellClass(fullWidth, col, class) %} {{- (class is iterable ? class : [class])|merge([ "#{col.type}-cell", col.type in [ 'autosuggest', 'color', 'date', 'email', 'multiline', 'number', 'singleline', 'template', 'time', 'url', ] ? 'textual' : null, fullWidth and (col.thin ?? false) ? 'thin' : null, col.info is defined ? 'has-info' : null, ]|filter)|join(' ') -}} {% endmacro %} {% set tableAttributes = { id: id, class: [ 'editable', fullWidth ? 'fullwidth', static ? 'static', totalRows == 0 ? 'hidden', ]|filter, } %} {%- if block('attr') is defined %} {%- set tableAttributes = tableAttributes|merge(('
{{ value }}{% else %} {% endif %} {%- endswitch -%} {% endblock %}