ui: hide selection in tablemode

This commit is contained in:
nick-delirium 2025-02-21 17:36:23 +01:00
parent ed3020dc7e
commit 7e4782ae71
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 4 additions and 1 deletions

View file

@ -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}

View file

@ -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' }}
/>