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

Result table cell: add height prop

parent 5fbf7fcb
No related branches found
No related tags found
No related merge requests found
...@@ -193,7 +193,7 @@ class ResultTable extends React.Component { ...@@ -193,7 +193,7 @@ class ResultTable extends React.Component {
const dataCells = this.props.data.properties.map(column => { const dataCells = this.props.data.properties.map(column => {
const { const {
id, valueType, makeLink, externalLink, sortValues, sortBy, numberedList, minWidth, id, valueType, makeLink, externalLink, sortValues, sortBy, numberedList, minWidth,
linkAsButton, collapsedMaxWords, sourceExternalLink, renderAsHTML, HTMLParserTask height, linkAsButton, collapsedMaxWords, sourceExternalLink, renderAsHTML, HTMLParserTask
} = column } = column
let { previewImageHeight } = column let { previewImageHeight } = column
if (screenSize === 'xs' || screenSize === 'sm') { if (screenSize === 'xs' || screenSize === 'sm') {
...@@ -238,6 +238,7 @@ class ResultTable extends React.Component { ...@@ -238,6 +238,7 @@ class ResultTable extends React.Component {
sortValues={sortValues} sortValues={sortValues}
sortBy={sortBy} sortBy={sortBy}
numberedList={numberedList} numberedList={numberedList}
height={height}
minWidth={minWidth} minWidth={minWidth}
previewImageHeight={previewImageHeight} previewImageHeight={previewImageHeight}
container='cell' container='cell'
......
...@@ -9,12 +9,13 @@ import ImageGallerySRL from '../main_layout/ImageGallerySRL' ...@@ -9,12 +9,13 @@ import ImageGallerySRL from '../main_layout/ImageGallerySRL'
const ResultTableCell = props => { const ResultTableCell = props => {
const { const {
data, tableData, valueType, makeLink, externalLink, sortValues, sortBy, numberedList, minWidth, data, tableData, valueType, makeLink, externalLink, sortValues, sortBy, numberedList, minWidth,
container, columnId, expanded, linkAsButton, collapsedMaxWords, showSource, height, container, columnId, expanded, linkAsButton, collapsedMaxWords, showSource,
sourceExternalLink, renderAsHTML, HTMLParserTask, referencedTerm, previewImageHeight, sourceExternalLink, renderAsHTML, HTMLParserTask, referencedTerm, previewImageHeight,
onExpandClick, rowId, shortenLabel onExpandClick, rowId, shortenLabel
} = props } = props
let cellContent = null let cellContent = null
const cellStyle = { const cellStyle = {
...(height && { height }),
...(minWidth && { minWidth }) ...(minWidth && { minWidth })
} }
switch (valueType) { switch (valueType) {
......
...@@ -62,6 +62,7 @@ export const INITIAL_STATE = { ...@@ -62,6 +62,7 @@ export const INITIAL_STATE = {
externalLink: false, externalLink: false,
sortValues: true, sortValues: true,
numberedList: false, numberedList: false,
// height: 150,
minWidth: 200 minWidth: 200
}, },
{ {
......
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