Skip to content
Snippets Groups Projects
Commit 55768c8e authored by Kyle Doherty's avatar Kyle Doherty
Browse files

first stabs at table styling

parent 39935065
No related branches found
No related tags found
No related merge requests found
.MB-DataTable-header {
background-color: #fff;
background-image: none;
}
.MB-DataTable-header .Icon-chevrondown { opacity: 0; }
.MB-DataTable-header:hover .Icon-chevrondown { opacity: 1; }
/* what follows is a war crime but such is the state of FE development */
.Visualization .public_fixedDataTable_main {
border-color: red;
}
.Visualization .public_fixedDataTableRow_highlighted,
.Visualization .public_fixedDataTableRow_highlighted .public_fixedDataTableCell_main {
background-color: #fff;
}
'use strict';
import FixedDataTable from 'fixed-data-table';
import Icon from './icon.react';
var Table = FixedDataTable.Table;
var Column = FixedDataTable.Column;
......@@ -78,12 +79,18 @@ export default React.createClass({
tableHeaderRenderer: function(columnIndex) {
var column = this.props.data.cols[columnIndex],
colVal = (column !== null) ? column.name.toString() : null;
colVal = (column !== null) ? column.name.toString() : null,
headerClasses = 'MB-DataTable-header flex align-center';
if (this.isSortable()) {
return (<div onClick={this.setSort.bind(null, column.id)}>{colVal}</div>);
return (
<div className={headerClasses} onClick={this.setSort.bind(null, column.id)}>
{colVal}
<Icon className="flex-align-right" name="chevrondown" width="12px" height="12px"></Icon>
</div>
);
} else {
return (<div>{colVal}</div>);
return (<div className={headerClasses}>{colVal}</div>);
}
},
......@@ -113,6 +120,7 @@ export default React.createClass({
return (
<Column
className="MB-DataTable-column"
width={colWidth}
isResizable={true}
headerRenderer={component.tableHeaderRenderer.bind(null, idx)}
......@@ -125,6 +133,7 @@ export default React.createClass({
return (
<Table
className="MB-DataTable"
rowHeight={35}
rowGetter={this.rowGetter}
rowsCount={rowCount}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment