Commit 1be88936 authored by Laura Fuentes Grau's avatar Laura Fuentes Grau

fix for table widget: table now scrollable #101

parent 2c5d6873
......@@ -415,7 +415,13 @@ div[class*="-widget"] label {
background-color: #fff;
}
.table-widget td, .table-widget th {
.table-widget th {
position: sticky;
top: 0;
text-align: left;
}
.table-widget td{
text-align: left;
}
......
......@@ -94,6 +94,7 @@ class WidgetTable extends Component {
render() {
let rows = this.state.rows;
if(rows.length === 0){
rows.push({
name: "no entries"
......@@ -109,7 +110,7 @@ class WidgetTable extends Component {
columns.push(<TableColumn key={3} title="Unit" dataKey="unit" />)
return (
<div className="table-widget">
<div className="table-widget" style={{width: this.props.widget.width, height: this.props.widget.height, overflowY: 'auto'}}>
<Table data={rows}>
{ columns }
</Table>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment