Skip to content
Snippets Groups Projects
Commit a22c4836 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Fix search line edit width that forces DataTables to hide columns when there is little room

parent e48ad732
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,8 @@ class DataTableView extends LitElement { ...@@ -110,7 +110,8 @@ class DataTableView extends LitElement {
&& (typeof element.visible === 'undefined' || element.visible !== false) && (typeof element.visible === 'undefined' || element.visible !== false)
&& (typeof element.searchable === 'undefined' || element.searchable !== false)) { && (typeof element.searchable === 'undefined' || element.searchable !== false)) {
const input = document.createElement('input'); const input = document.createElement('input');
input.type = 'text'; input.type = 'text123';
input.className = 'search-line';
input.id = 'input-col-' + index; input.id = 'input-col-' + index;
input.placeholder = 'Search in ' + element.title; input.placeholder = 'Search in ' + element.title;
th.appendChild(input); th.appendChild(input);
...@@ -218,6 +219,7 @@ class DataTableView extends LitElement { ...@@ -218,6 +219,7 @@ class DataTableView extends LitElement {
} }
static get styles() { static get styles() {
// language=css
const orderExpandIconOverrides = css` const orderExpandIconOverrides = css`
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child::before, table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child::before { table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child::before, table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child::before {
all: initial; all: initial;
...@@ -294,6 +296,10 @@ class DataTableView extends LitElement { ...@@ -294,6 +296,10 @@ class DataTableView extends LitElement {
border-width: 1px; border-width: 1px;
padding: 0.1em; padding: 0.1em;
} }
table.dataTable .search-line {
width: 100%;
}
`; `;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment