Skip to content

Commit

Permalink
fix(core/datatable): revert horizontal scrollbar fix
Browse files Browse the repository at this point in the history
Revert of ems-project#599

Not correct when dataTable is empty
  • Loading branch information
Davidmattei committed Sep 25, 2023
1 parent cf475a5 commit 3dc0dc9
Show file tree
Hide file tree
Showing 20 changed files with 58,396 additions and 58,396 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{%- use '@EMSAdminUI/bootstrap5/form/forms.html.twig' -%}
{% trans_default_domain 'EMSCoreBundle' %}

<table class="table table-condensed table-striped" data-datatable="{{ datatable.frontendOptions|json_encode|e('html_attr') }}" style="width: 100%;">
<thead>

<div class="table-responsive">
<table class="table table-condensed table-striped" data-datatable="{{ datatable.frontendOptions|json_encode|e('html_attr') }}">
<thead>
<tr role="row">
{% if datatable.supportsTableActions %}
<th class="fit" data-orderable="false" data-name="_checkbox">
Expand All @@ -23,8 +25,8 @@
<th class="nowrap" data-orderable="false">{{ 'table.index.column.actions'|trans }}</th>
{% endif %}
</tr>
</thead>
<tbody>
</thead>
<tbody>
{% for line in datatable %}
<tr>
{% if datatable.supportsTableActions %}
Expand All @@ -42,12 +44,13 @@
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</tbody>
</table>
</div>
{% if datatable.supportsTableActions %}
<div class="btn-group">
{% for action in datatable.tableActions %}
{{ form_widget(attribute(form, action.name)) }}
{% endfor %}
</div>
{% endif %}
{% endif %}
4 changes: 0 additions & 4 deletions EMS/core-bundle/assets/css/_ems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ div.core-js-progress {
& i { padding-right: 10px;}
}

div.dataTables_scroll {
margin-bottom: 10px;
}

button > * {
pointer-events: none; /* icons clickable inside button, js using event.target */
}
4 changes: 1 addition & 3 deletions EMS/core-bundle/src/Form/Data/TableAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,7 @@ public function getFrontendOptions(): array
++$counter;
}
}
$options = [
'scrollX' => true,
];
$options = [];

if (null !== $columnIndex) {
$options['order'] = [[$columnIndex, $this->orderDirection]];
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 3dc0dc9

Please sign in to comment.