mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Force re-rendering of each editor row type change (#32993)
This commit is contained in:
parent
dac9393061
commit
136460d369
@ -21,7 +21,7 @@ export const BucketAggregationsEditor: FunctionComponent<Props> = ({ nextId }) =
|
|||||||
<>
|
<>
|
||||||
{bucketAggs!.map((bucketAgg, index) => (
|
{bucketAggs!.map((bucketAgg, index) => (
|
||||||
<QueryEditorRow
|
<QueryEditorRow
|
||||||
key={bucketAgg.id}
|
key={`${bucketAgg.type}-${bucketAgg.id}`}
|
||||||
label={index === 0 ? 'Group By' : 'Then By'}
|
label={index === 0 ? 'Group By' : 'Then By'}
|
||||||
onRemoveClick={totalBucketAggs > 1 && (() => dispatch(removeBucketAggregation(bucketAgg.id)))}
|
onRemoveClick={totalBucketAggs > 1 && (() => dispatch(removeBucketAggregation(bucketAgg.id)))}
|
||||||
>
|
>
|
||||||
|
@ -22,7 +22,7 @@ export const MetricAggregationsEditor: FunctionComponent<Props> = ({ nextId }) =
|
|||||||
<>
|
<>
|
||||||
{metrics?.map((metric, index) => (
|
{metrics?.map((metric, index) => (
|
||||||
<QueryEditorRow
|
<QueryEditorRow
|
||||||
key={metric.id}
|
key={`${metric.type}-${metric.id}`}
|
||||||
label={`Metric (${metric.id})`}
|
label={`Metric (${metric.id})`}
|
||||||
hidden={metric.hide}
|
hidden={metric.hide}
|
||||||
onHideClick={() => dispatch(toggleMetricVisibility(metric.id))}
|
onHideClick={() => dispatch(toggleMetricVisibility(metric.id))}
|
||||||
|
Loading…
Reference in New Issue
Block a user