Skip to content
Snippets Groups Projects
Commit 1ca3ed70 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Fix responsiveness in on the demo page

For some reason setting autoWidth and setting the table width to 100% makes it work.
Only on the demo page though and not in the app, but it's a start.
parent fc30bc80
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ class DataTableView extends LitElement {
this.table = $(this.shadowRoot.querySelector('table')).DataTable({
destroy: true,
autoWidth: false,
autoWidth: true,
language: lang_obj,
paging: this.paging,
searching: this.searching,
......@@ -116,17 +116,14 @@ class DataTableView extends LitElement {
]
});
try {
new $.fn.dataTable.Responsive(this.table, {
details: true
});
} catch (e) {
// XXX: it throws, but it still works
}
this.data = data;
this.table.clear().rows.add(this.data).draw();
new $.fn.dataTable.Responsive(this.table, {
details: true
});
}
update(changedProperties) {
......@@ -152,9 +149,14 @@ class DataTableView extends LitElement {
border-radius: var(--vpu-border-radius);
background: transparent;
}
.export-btn {
margin-bottom: .6rem;
}
:host {
display: block;
}
`;
}
......@@ -171,7 +173,7 @@ class DataTableView extends LitElement {
<style>
${this.cssStyle}
</style>
<div><table></table></div>
<div><table width="100%"></table></div>
`;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment