Skip to content
Snippets Groups Projects
Commit 89eca2f4 authored by esikkala's avatar esikkala
Browse files

Result table: add condition for expand buttons

parent 0e1f3012
No related branches found
No related tags found
No related merge requests found
......@@ -189,6 +189,7 @@ class ResultTable extends React.Component {
? true
: this.state.expandedRows.has(row.id)
let hasExpandableContent = false
let renderExpandButton = hasExpandableContent
const dataCells = this.props.data.properties.map(column => {
const {
id, valueType, makeLink, externalLink, sortValues, sortBy, numberedList, minWidth,
......@@ -221,6 +222,9 @@ class ResultTable extends React.Component {
shortenLabel = !expanded // shorten label only if the cell is not expanded
}
}
if (data.paginatedResultsAlwaysExpandRows) {
renderExpandButton = false
}
return (
<ResultTableCell
key={id}
......@@ -253,7 +257,7 @@ class ResultTable extends React.Component {
return (
<TableRow key={row.id}>
<TableCell className={classes.expandCell}>
{hasExpandableContent &&
{renderExpandButton &&
<IconButton
className={clsx(classes.expand, {
[classes.expandOpen]: expanded
......
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