Skip to content

Commit

Permalink
Moved tables to div with class ez-scrollable-table-wrapper (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszdebinski authored Dec 10, 2020
1 parent 0a8f341 commit de73a9d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@
</button>
</div>
</div>
<table class="ez-table table">
<thead>
<tr>
<th></th>
{% for column in columns %}
<th data-identifier="{{ column['identifier'] }}">{{ column['name'] }}</th>
{% endfor %}
</tr>
</thead>
<tbody class="ez-table__body" data-minimum-rows="{{ minimum_rows }}" data-next-index="{{ form.entries.children|length ? max(form.entries.children|keys) + 1 : 0 }}">
{{ form_widget(form) }}
</tbody>
</table>
<div class="ez-scrollable-table-wrapper">
<table class="ez-table table">
<thead>
<tr>
<th></th>
{% for column in columns %}
<th data-identifier="{{ column['identifier'] }}">{{ column['name'] }}</th>
{% endfor %}
</tr>
</thead>
<tbody class="ez-table__body" data-minimum-rows="{{ minimum_rows }}" data-next-index="{{ form.entries.children|length ? max(form.entries.children|keys) + 1 : 0 }}">
{{ form_widget(form) }}
</tbody>
</table>
</div>
{% endblock %}

{% block ezplatform_fieldtype_ezmatrix_entry_row %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@
{% set columnsSettings = fieldSettings['columns'] %}
{% set fieldData = field.value.rows %}

<table class="ez-table table">
<thead>
<div class="ez-scrollable-table-wrapper">
<table class="ez-table table">
<thead>
<tr>
{% for column in columnsSettings %}
<th>{{ column['name'] }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for data in fieldData %}
<tr>
{% for column in columnsSettings %}
<th>{{ column['name'] }}</th>
<td>{{ data.cells[column['identifier']]|default }}</td>
{% endfor %}
</tr>
</thead>
<tbody>
{% for data in fieldData %}
<tr>
{% for column in columnsSettings %}
<td>{{ data.cells[column['identifier']]|default }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</tbody>
</table>
</div>
{% endblock %}

0 comments on commit de73a9d

Please sign in to comment.