mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
feat(explore): Don't discard controls with custom sql when changing datasource (#20934)
This commit is contained in:
committed by
GitHub
parent
ec20c0104e
commit
cddc361adc
@@ -35,6 +35,7 @@ const propTypes = {
|
||||
savedMetricsOptions: PropTypes.arrayOf(savedMetricType),
|
||||
multi: PropTypes.bool,
|
||||
datasource: PropTypes.object,
|
||||
datasourceWarningMessage: PropTypes.string,
|
||||
};
|
||||
|
||||
export default function MetricDefinitionValue({
|
||||
@@ -50,6 +51,7 @@ export default function MetricDefinitionValue({
|
||||
index,
|
||||
type,
|
||||
multi,
|
||||
datasourceWarningMessage,
|
||||
}) {
|
||||
const getSavedMetricByName = metricName =>
|
||||
savedMetrics.find(metric => metric.metric_name === metricName);
|
||||
@@ -78,6 +80,7 @@ export default function MetricDefinitionValue({
|
||||
savedMetric: savedMetric ?? {},
|
||||
type,
|
||||
multi,
|
||||
datasourceWarningMessage,
|
||||
};
|
||||
|
||||
return <AdhocMetricOption {...metricOptionProps} />;
|
||||
|
||||
Reference in New Issue
Block a user