2.39.0 • Published 3 years ago
@ecl-twig/ec-component-table v2.39.0
ECL-Twig Table component
npm package: @ecl-twig/ec-component-table
npm install --save @ecl-twig/ec-component-table
Parameters:
- "zebra" (boolean) (default: false))
- "sortable" (boolean) (default: false)
- "headers" (array) (default: [])
- "label" (string or array of string)
- "colspan" (string) (default: ''),
- "rows" (array) (default: [])
[
- "extra_attributes": (string) (default: '') Extra attributes for the row (space separated)
- "extra_classes": (string) (default: '') Extra classes for the table row (space separated) { - "label" (string or array of string) - "data-ecl-table-header" (string) (default: ''), - "data-ecl-table-header-group" (string) (default: '') - "group" (bool) (default: false), } ],
- "extra_classes" (optional) (string) (default: '') Extra classes (space separated)
- "extra_attributes" (optional) (array) (default: []) Extra attributes
- "name" (string) Attribute name, eg. 'data-test'
- "value" (string) Attribute value, eg: 'data-test-1'
- "_compliance_" (boolean) (default: false) Activates debug
Example:
{% include '@ecl-twig/ec-component-table/ecl-table.html.twig' with {
zebra: true,
headers: [
[
{ label: 'Name' },
{ label: 'Registration date' },
{ label: 'Languages', colspan: '3' },
],
[
{ label: '' },
{ label: '' },
{ label: 'English' },
{ label: 'French' },
{ label: 'German' },
],
],
rows: [
[
extra_classes: 'an-extra-class',
extra_attributes: 'an-extra-attribute="with_a_value", another-attribute',
{ label: 'John', 'data-ecl-table-header': 'Name' },
{
label: 'September 14, 2013',
'data-ecl-table-header': 'Registration date',
},
{
label: 'Yes',
'data-ecl-table-header': 'English',
'data-ecl-table-header-group': 'Language',
group: true,
},
{
label: 'No',
'data-ecl-table-header': 'French',
group: true,
},
{
label: 'Yes',
'data-ecl-table-header': 'German',
group: true,
},
],
[
extra_classes: 'an-extra-class',
extra_attributes: 'an-extra-attribute',
{ label: 'Ron', 'data-ecl-table-header': 'Name' },
{
label: 'October 23, 2014',
'data-ecl-table-header': 'Registration date',
},
{
label: 'Yes',
'data-ecl-table-header': 'English',
'data-ecl-table-header-group': 'Language',
group: true,
},
{
label: 'Yes',
'data-ecl-table-header': 'French',
group: true,
},
{
label: 'Yes',
'data-ecl-table-header': 'German',
group: true,
},
],
[
{ label: 'Albert', 'data-ecl-table-header': 'Name' },
{
label: 'December 13, 2014',
'data-ecl-table-header': 'Registration date',
},
{
label: 'No',
'data-ecl-table-header': 'English',
'data-ecl-table-header-group': 'Language',
group: true,
},
{
label: 'No',
'data-ecl-table-header': 'French',
group: true,
},
{
label: 'Yes',
'data-ecl-table-header': 'German',
group: true,
},
],
[
{ label: 'Marcel', 'data-ecl-table-header': 'Name' },
{
label: 'January 12, 1995',
'data-ecl-table-header': 'Registration date',
},
{
label: 'Yes',
'data-ecl-table-header': 'English',
'data-ecl-table-header-group': 'Language',
group: true,
},
{
label: 'Yes',
'data-ecl-table-header': 'French',
group: true,
},
{
label: 'Yes',
'data-ecl-table-header': 'German',
group: true,
},
],
],
extra_classes: 'my-extra-class-1 my-extra-class-2',
extra_attributes: [
{ name: 'data-test-1', value: 'data-test-value-1' },
{ name: 'data-test-2', value: 'data-test-value-2' }
]
} %}
2.39.0
3 years ago
2.38.0
4 years ago
2.37.0
4 years ago
2.36.0
4 years ago
2.35.2
4 years ago
2.35.1
4 years ago
2.35.0
4 years ago
2.34.0
4 years ago
2.33.2
4 years ago
2.33.1
4 years ago
2.33.0
4 years ago
2.32.0
4 years ago
2.31.1
4 years ago
2.31.0
4 years ago
2.30.0
4 years ago
2.29.0
5 years ago
2.28.1
5 years ago
2.28.0
5 years ago
2.27.0
5 years ago
2.26.0
5 years ago
2.25.1
5 years ago
2.25.0
5 years ago
2.24.0
5 years ago
2.23.0
5 years ago
2.22.1
5 years ago
2.22.0
5 years ago
2.21.0
5 years ago
2.19.0
5 years ago
2.18.0
5 years ago
2.17.3
5 years ago
2.17.0
5 years ago
2.16.1
5 years ago
2.15.1
5 years ago
2.15.0
5 years ago
2.11.2
5 years ago
2.11.1
5 years ago
2.11.0
5 years ago
2.9.1
5 years ago
2.9.0
5 years ago