ui: hide selection in tablemode
This commit is contained in:
parent
ed3020dc7e
commit
7e4782ae71
2 changed files with 4 additions and 1 deletions
|
|
@ -538,6 +538,7 @@ function WidgetChart(props: Props) {
|
|||
|
||||
|
||||
const showTable = _metric.metricType === TIMESERIES && (props.isPreview || _metric.viewType === TABLE)
|
||||
const tableMode = _metric.viewType === 'table' && _metric.metricType === TIMESERIES
|
||||
return (
|
||||
<div ref={ref}>
|
||||
{loading ? stale ? <LongLoader onClick={loadSample} /> : <Loader loading={loading} style={{ height: `240px` }} /> : (
|
||||
|
|
@ -549,6 +550,7 @@ function WidgetChart(props: Props) {
|
|||
inBuilder={props.isPreview}
|
||||
defaultOpen={true}
|
||||
data={data}
|
||||
tableMode={tableMode}
|
||||
enabledRows={enabledRows}
|
||||
setEnabledRows={setEnabledRows}
|
||||
metric={_metric}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ interface Props {
|
|||
defaultOpen?: boolean;
|
||||
metric: { name: string; viewType: string };
|
||||
inBuilder?: boolean;
|
||||
tableMode?: boolean;
|
||||
}
|
||||
|
||||
function WidgetDatatable(props: Props) {
|
||||
|
|
@ -161,7 +162,7 @@ function WidgetDatatable(props: Props) {
|
|||
columns={tableProps}
|
||||
dataSource={tableData}
|
||||
pagination={false}
|
||||
rowSelection={rowSelection}
|
||||
rowSelection={props.tableMode ? undefined : rowSelection}
|
||||
size={'small'}
|
||||
scroll={{ x: 'max-content' }}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue