aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/TableBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-08-17 13:24:03 -0400
committerGitHub <noreply@github.com>2023-08-17 13:24:03 -0400
commit0ff267634af5fe833541ddc1bc792a9362260a01 (patch)
tree39feb1d18c1005f394a06317616cfff9d0c836c0 /src/client/views/nodes/DataVizBox/components/TableBox.tsx
parent53d0d31e37ef4ab6fb1ef0c8d9d1e9542b8b5598 (diff)
parent5e8a263c2d891370467f0faccf3330179cedd699 (diff)
Merge pull request #209 from brown-dash/data-visualization-sarah
DataViz small bug fixes
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/TableBox.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index 5579d6d80..edec72cc5 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -164,10 +164,10 @@ export class TableBox extends React.Component<TableBoxProps> {
})}
style={{ background: StrListCast(this.props.layoutDoc.dataViz_selectedRows).includes(guid) ? 'lightgrey' : '', width: '110%' }}>
{this.columns.map(col => {
- // each cell
- var colSelected = this.props.axes[0] == col || this.props.axes[1] == col;
- return (
- <td key={this.columns.indexOf(col)} style={{ border: colSelected ? '3px solid black' : '1px solid black', fontWeight: colSelected ? 'bolder' : 'normal' }}>
+ // each cell
+ var colSelected = this.props.axes.length>1? (this.props.axes[0]==col || this.props.axes[1]==col) : this.props.axes.length>0? this.props.axes[0]==col : false;
+ return (
+ <td key={this.columns.indexOf(col)} style={{border: colSelected? '3px solid black' : '1px solid black', fontWeight: colSelected? 'bolder' : 'normal'}}>
{p[col]}
</td>
);