From a22c48361e2017eacdfe4202f129934c8b29f428 Mon Sep 17 00:00:00 2001
From: Patrizio Bekerle <patrizio.bekerle@tugraz.at>
Date: Fri, 24 Jan 2020 08:43:07 +0100
Subject: [PATCH] Fix search line edit width that forces DataTables to hide
 columns when there is little room

---
 packages/data-table-view/src/vpu-data-table-view.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/data-table-view/src/vpu-data-table-view.js b/packages/data-table-view/src/vpu-data-table-view.js
index 23a426f6..4c470906 100644
--- a/packages/data-table-view/src/vpu-data-table-view.js
+++ b/packages/data-table-view/src/vpu-data-table-view.js
@@ -110,7 +110,8 @@ class DataTableView extends LitElement {
                         && (typeof element.visible === 'undefined' || element.visible !== false)
                         && (typeof element.searchable === 'undefined' || element.searchable !== false)) {
                         const input = document.createElement('input');
-                        input.type = 'text';
+                        input.type = 'text123';
+                        input.className = 'search-line';
                         input.id = 'input-col-' + index;
                         input.placeholder = 'Search in ' + element.title;
                         th.appendChild(input);
@@ -218,6 +219,7 @@ class DataTableView extends LitElement {
     }
 
     static get styles() {
+        // language=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 {
                 all: initial;
@@ -294,6 +296,10 @@ class DataTableView extends LitElement {
                 border-width: 1px;
                 padding: 0.1em;
             }
+
+            table.dataTable .search-line {
+                width: 100%;
+            }
         `;
     }
 
-- 
GitLab