From a2b6dd34d73bf432846dc59c6f57dd59a03aff9b Mon Sep 17 00:00:00 2001
From: Michael Dürre <michael.duerre@highstreet-technologies.com>
Date: Thu, 8 Sep 2022 09:45:06 +0200
Subject: update odlux sources
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

update basic odlux functionality for kohn

Issue-ID: CCSDK-3765
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Change-Id: I3723c9c2f35b9012ba537920b294a54bb556cbc6
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
---
 .../framework/src/components/material-table/tableHead.tsx  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'sdnr/wt/odlux/framework/src/components/material-table/tableHead.tsx')

diff --git a/sdnr/wt/odlux/framework/src/components/material-table/tableHead.tsx b/sdnr/wt/odlux/framework/src/components/material-table/tableHead.tsx
index c500f44ce..d6f7b7def 100644
--- a/sdnr/wt/odlux/framework/src/components/material-table/tableHead.tsx
+++ b/sdnr/wt/odlux/framework/src/components/material-table/tableHead.tsx
@@ -50,7 +50,9 @@ interface IEnhancedTableHeadComponentProps extends styles_header {
   orderBy: string | null;
   rowCount: number;
   columns: ColumnModel<{}>[];
+  hiddenColumns: string[];
   enableSelection?: boolean;
+  allowHtmlHeader?: boolean;
 }
 
 class EnhancedTableHeadComponent extends React.Component<IEnhancedTableHeadComponentProps> {
@@ -77,7 +79,7 @@ class EnhancedTableHeadComponent extends React.Component<IEnhancedTableHeadCompo
           }
           { columns.map(col => {
             const style = col.width ? { width: col.width } : {};
-            return (
+            const tableCell = (
               <TableCell className= {classes.header}
                 key={ col.property }
                 align={ col.type === ColumnType.numeric ? 'right' : 'left' } 
@@ -102,11 +104,19 @@ class EnhancedTableHeadComponent extends React.Component<IEnhancedTableHeadCompo
                       direction={ order || undefined }
                       onClick={ this.createSortHandler(col.property) }
                     >
-                      { col.title || col.property }
+                      {
+                        this.props.allowHtmlHeader ? <div className="content" dangerouslySetInnerHTML={{__html: col.title || col.property}}></div>
+                       :  (col.title || col.property )
+                      }
                     </TableSortLabel>
                   </Tooltip> }
               </TableCell>
             );
+
+            //show column if...
+            const showColumn = !this.props.hiddenColumns.includes(col.property);
+
+            return showColumn && tableCell;
           }, this) }
         </TableRow>
       </TableHead>
-- 
cgit 1.2.3-korg

