From 05ef023752abdb4f1e072332496dc7c6eaff8965 Mon Sep 17 00:00:00 2001
From: herbert <herbert.eiselt@highstreet-technologies.com>
Date: Sat, 1 Feb 2020 16:00:00 +0100
Subject: SDN-R add updated odlux

Updates all odlux framework and app components.

Issue-ID: SDNC-1032
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I13c520489fd40d05b7fd5215f5941af6238e9cae
---
 sdnr/wt/odlux/framework/src/components/material-table/index.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

diff --git a/sdnr/wt/odlux/framework/src/components/material-table/index.tsx b/sdnr/wt/odlux/framework/src/components/material-table/index.tsx
index 3e31c5e03..520674441 100644
--- a/sdnr/wt/odlux/framework/src/components/material-table/index.tsx
+++ b/sdnr/wt/odlux/framework/src/components/material-table/index.tsx
@@ -179,7 +179,7 @@ class MaterialTableComponent<TData extends {} = {}> extends React.Component<Mate
         <TableToolbar tableId={this.props.tableId} numSelected={selected && selected.length} title={this.props.title} customActionButtons={this.props.customActionButtons} onExportToCsv={this.exportToCsv}
           onToggleFilter={toggleFilter} />
         <div className={classes.tableWrapper}>
-          <Table className={classes.table} aria-labelledby="tableTitle">
+          <Table className={classes.table} aria-label={this.props.tableId ? this.props.tableId : 'tableTitle'}>
             <EnhancedTableHead
               columns={columns}
               numSelected={selected && selected.length}
@@ -193,7 +193,7 @@ class MaterialTableComponent<TData extends {} = {}> extends React.Component<Mate
             <TableBody>
               {showFilter && <EnhancedTableFilter columns={columns} filter={filter} onFilterChanged={this.onFilterChanged} enableSelection={this.props.enableSelection} /> || null}
               {rows // may need ordering here
-                .map((entry: TData & { [key: string]: any }) => {
+                .map((entry: TData & { [key: string]: any }, index) => {
                   const entryId = getId(entry);
                   const isSelected = this.isSelected(entryId);
                   return (
@@ -202,6 +202,7 @@ class MaterialTableComponent<TData extends {} = {}> extends React.Component<Mate
                       onClick={event => this.handleClick(event, entry, entryId)}
                       role="checkbox"
                       aria-checked={isSelected}
+                      aria-label={`${(this.props.tableId ? this.props.tableId : 'table')}-row-${(index + 1)}`}
                       tabIndex={-1}
                       key={entryId}
                       selected={isSelected}
-- 
cgit 1.2.3-korg

