1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

fix for table widget: table now scrollable #101

This commit is contained in:
Laura Fuentes Grau 2020-05-24 14:42:30 +02:00
parent 2c5d68730e
commit 1be889365e
2 changed files with 9 additions and 2 deletions

View file

@ -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;
}

View file

@ -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>