Skip to content
Snippets Groups Projects
Commit 09c570ec authored by esikkala's avatar esikkala
Browse files

Fix table subview layout

parent e73844db
No related branches found
No related tags found
No related merge requests found
...@@ -13,10 +13,15 @@ import ResultTableHead from './ResultTableHead'; ...@@ -13,10 +13,15 @@ import ResultTableHead from './ResultTableHead';
import { has, orderBy } from 'lodash'; import { has, orderBy } from 'lodash';
const styles = (theme) => ({ const styles = (theme) => ({
table: { tableContainer: {
marginTop: 72, marginTop: 72,
overflow: 'auto',
width: '100% - 8px'
},
table: {
//marginTop: 72,
minWidth: 700, minWidth: 700,
overflowX: 'auto', //overflowX: 'auto',
backgroundColor: theme.palette.background.paper backgroundColor: theme.palette.background.paper
}, },
paginationRow: { paginationRow: {
...@@ -215,50 +220,52 @@ class ResultTable extends React.Component { ...@@ -215,50 +220,52 @@ class ResultTable extends React.Component {
); );
} else { } else {
return ( return (
<Table className={classes.table}> <div className={classes.tableContainer}>
<ResultTableHead <Table className={classes.table}>
fetchFacet={this.props.fetchFacet} <ResultTableHead
fetchManuscripts={this.props.fetchManuscripts} fetchFacet={this.props.fetchFacet}
facet={this.props.facet} fetchManuscripts={this.props.fetchManuscripts}
results={this.props.results} facet={this.props.facet}
page={this.props.page} results={this.props.results}
/> page={this.props.page}
<TableBody> />
{rows.map(row => { <TableBody>
return ( {rows.map(row => {
<TableRow key={row.id}> return (
<TableCell component="th" scope="row" > <TableRow key={row.id}>
{this.idRenderer(row)} <TableCell component="th" scope="row" >
</TableCell> {this.idRenderer(row)}
<TableCell className={classes.withFilter} > </TableCell>
{this.stringListRenderer(row.prefLabel)} <TableCell className={classes.withFilter} >
</TableCell> {this.stringListRenderer(row.prefLabel)}
<TableCell className={classes.withFilter}> </TableCell>
{this.objectListRenderer(row.author, true)} <TableCell className={classes.withFilter}>
</TableCell> {this.objectListRenderer(row.author, true)}
<TableCell className={classes.withFilter}> </TableCell>
{this.objectListRenderer(row.creationPlace, true)} <TableCell className={classes.withFilter}>
</TableCell> {this.objectListRenderer(row.creationPlace, true)}
<TableCell className={classes.withFilter}> </TableCell>
{this.objectListRenderer(row.timespan)} <TableCell className={classes.withFilter}>
</TableCell> {this.objectListRenderer(row.timespan)}
<TableCell className={classes.withFilter}> </TableCell>
{this.stringListRenderer(row.language)} <TableCell className={classes.withFilter}>
</TableCell> {this.stringListRenderer(row.language)}
{/*<TableCell className={classes.withFilter}> </TableCell>
{/*<TableCell className={classes.withFilter}>
{this.stringListRenderer(row.material)} {this.stringListRenderer(row.material)}
</TableCell>*/} </TableCell>*/}
<TableCell className={classes.withFilter}> <TableCell className={classes.withFilter}>
{this.transactionRenderer(row.acquisition)} {this.transactionRenderer(row.acquisition)}
</TableCell> </TableCell>
<TableCell className={classes.withFilter}> <TableCell className={classes.withFilter}>
{this.ownerRenderer(row.owner)} {this.ownerRenderer(row.owner)}
</TableCell> </TableCell>
</TableRow> </TableRow>
); );
})} })}
</TableBody> </TableBody>
</Table> </Table>
</div>
); );
} }
} }
......
...@@ -41,7 +41,6 @@ const styles = theme => ({ ...@@ -41,7 +41,6 @@ const styles = theme => ({
//minHeight: 700 //minHeight: 700
}, },
mainContainer: { mainContainer: {
overflow: 'auto',
display: 'flex', display: 'flex',
width: '100%', width: '100%',
marginTop: 64, marginTop: 64,
......
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