aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DataVizBox/components/TableBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/DataVizBox/components/TableBox.tsx')
-rw-r--r--src/client/views/nodes/DataVizBox/components/TableBox.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/TableBox.tsx b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
index 1ece3f238..b88389de6 100644
--- a/src/client/views/nodes/DataVizBox/components/TableBox.tsx
+++ b/src/client/views/nodes/DataVizBox/components/TableBox.tsx
@@ -175,7 +175,7 @@ export class TableBox extends React.Component<TableBoxProps> {
<Button onClick={action(() => (this.props.layoutDoc.dataViz_selectedRows = new List<number>()))} text="Deselect All" type={Type.SEC} color={'black'} />
</div>
<div
- className={`table-container ${this.columns[0]}`}
+ className={`tableBox-container ${this.columns[0]}`}
style={{ height: '100%', overflow: 'auto' }}
onScroll={this.handleScroll}
ref={action((r: HTMLDivElement | null) => {
@@ -193,7 +193,7 @@ export class TableBox extends React.Component<TableBoxProps> {
}
})}>
<table
- className="table"
+ className="tableBox-table"
ref={action((r: HTMLTableElement | null) => {
if (!this.props.docView?.()?.ContentDiv?.hidden && r) {
this._tableHeight = r?.getBoundingClientRect().height ?? 0;
@@ -220,21 +220,19 @@ export class TableBox extends React.Component<TableBoxProps> {
<tbody>
{this._tableDataIds
.filter(rowId => this.startID <= rowId && rowId <= this.endID)
- ?.map(rowId => ({ record: this.props.records[rowId], rowId }))
- .map(({ record, rowId }) => (
+ ?.map(rowId => (
<tr
key={rowId}
- className={`table-row ${this.columns[0]}`}
+ className={`tableBox-row ${this.columns[0]}`}
onClick={e => this.tableRowClick(e, rowId)}
style={{
background: NumListCast(this.props.layoutDoc.dataViz_highlitedRows).includes(rowId) ? 'lightYellow' : NumListCast(this.props.layoutDoc.dataViz_selectedRows).includes(rowId) ? 'lightgrey' : '',
- width: '110%',
}}>
{this.columns.map(col => {
const 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' }}>
- <div style={{ textOverflow: 'ellipsis', width: '100%', whiteSpace: 'pre', maxWidth: 150, overflow: 'hidden' }}>{record[col]}</div>
+ <div className="tableBox-cell">{this.props.records[rowId][col]}</div>
</td>
);
})}