[ARVADOS-WORKBENCH2] updated: 1.1.4-78-g7cea5ab
Git user
git at public.curoverse.com
Fri Jun 15 05:56:04 EDT 2018
Summary of changes:
src/components/data-table/data-table.tsx | 40 ++++++++++++++++++--------------
1 file changed, 22 insertions(+), 18 deletions(-)
via 7cea5abf194fe6709ec25dbbd819e4c4be2faba0 (commit)
from e806c7001a4be0bb4b5a27995d89bd560d5fe8db (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 7cea5abf194fe6709ec25dbbd819e4c4be2faba0
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Fri Jun 15 11:55:51 2018 +0200
Clean up data table code
Feature #13601
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx
index 382ce1e..5a372c4 100644
--- a/src/components/data-table/data-table.tsx
+++ b/src/components/data-table/data-table.tsx
@@ -3,9 +3,8 @@
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { Table, TableBody, TableRow, TableCell, TableHead, StyleRulesCallback, Theme, WithStyles, withStyles, Typography, Grid } from '@material-ui/core';
+import { Table, TableBody, TableRow, TableCell, TableHead, StyleRulesCallback, Theme, WithStyles, withStyles, Typography } from '@material-ui/core';
import { Column } from './column';
-import ColumnsConfigurator from "./columns-configurator/columns-configurator";
export interface DataTableProps<T> {
items: T[];
@@ -24,27 +23,32 @@ class DataTable<T> extends React.Component<DataTableProps<T> & WithStyles<CssRul
<TableHead>
<TableRow>
{
- columns.filter(column => column.selected).map(({ header, renderHeader, key }, index) => (
- <TableCell key={key || index}>
- {renderHeader ? renderHeader() : header}
- </TableCell>
- ))
+ columns
+ .filter(column => column.selected)
+ .map(({ header, renderHeader, key }, index) => (
+ <TableCell key={key || index}>
+ {renderHeader ? renderHeader() : header}
+ </TableCell>
+ ))
}
</TableRow>
</TableHead>
<TableBody className={classes.tableBody}>
{
- items.map((item, index) => (
- <TableRow key={index} hover onClick={() => onItemClick && onItemClick(item)}>
- {
- columns.filter(column => column.selected).map((column, index) => (
- <TableCell key={column.key || index}>
- {column.render(item)}
- </TableCell>
- ))
- }
- </TableRow>
- ))
+ items
+ .map((item, index) => (
+ <TableRow key={index} hover onClick={() => onItemClick && onItemClick(item)}>
+ {
+ columns
+ .filter(column => column.selected)
+ .map((column, index) => (
+ <TableCell key={column.key || index}>
+ {column.render(item)}
+ </TableCell>
+ ))
+ }
+ </TableRow>
+ ))
}
</TableBody>
</Table>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list