mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
feat: reset metrics on dataset change (#12782)
* reset metrics on dataset change take one * remove code * part 2 or reseting adhoc controls * update input controls and customize defaults * remove conosles * remove extra method * simplify logic for controls reset and have them use their defaults * remove consoles * add annotation control to defaultvalues * remove line
This commit is contained in:
committed by
GitHub
parent
ac3e16d0ac
commit
3bb14ab950
@@ -38,6 +38,7 @@ const propTypes = {
|
||||
savedMetricsOptions: PropTypes.arrayOf(savedMetricType),
|
||||
multi: PropTypes.bool,
|
||||
datasourceType: PropTypes.string,
|
||||
datasource: PropTypes.string,
|
||||
};
|
||||
|
||||
export default function MetricDefinitionValue({
|
||||
@@ -51,6 +52,7 @@ export default function MetricDefinitionValue({
|
||||
onMoveLabel,
|
||||
onDropLabel,
|
||||
index,
|
||||
datasource,
|
||||
}) {
|
||||
const getSavedMetricByName = metricName =>
|
||||
savedMetrics.find(metric => metric.metric_name === metricName);
|
||||
@@ -77,6 +79,7 @@ export default function MetricDefinitionValue({
|
||||
onDropLabel,
|
||||
index,
|
||||
savedMetric: savedMetric ?? {},
|
||||
datasource,
|
||||
};
|
||||
|
||||
return <AdhocMetricOption {...metricOptionProps} />;
|
||||
|
||||
Reference in New Issue
Block a user