mirror of
https://github.com/apache/superset.git
synced 2026-07-18 20:55:47 +00:00
chore: Upgrade to React 18 (#38563)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
committed by
GitHub
parent
28239c18d4
commit
41a22d7918
@@ -139,7 +139,7 @@ const DndMetricSelect = (props: any) => {
|
||||
);
|
||||
|
||||
const handleChange = useCallback(
|
||||
opts => {
|
||||
(opts: ValueType | ValueType[] | null) => {
|
||||
// if clear out options
|
||||
if (opts === null) {
|
||||
onChange(null);
|
||||
@@ -150,7 +150,11 @@ const DndMetricSelect = (props: any) => {
|
||||
const optionValues = transformedOpts
|
||||
.map(option => {
|
||||
// pre-defined metric
|
||||
if (option.metric_name) {
|
||||
if (
|
||||
typeof option === 'object' &&
|
||||
'metric_name' in option &&
|
||||
option.metric_name
|
||||
) {
|
||||
return option.metric_name;
|
||||
}
|
||||
return option;
|
||||
@@ -263,7 +267,7 @@ const DndMetricSelect = (props: any) => {
|
||||
);
|
||||
|
||||
const getSavedMetricOptionsForMetric = useCallback(
|
||||
index =>
|
||||
(index: number) =>
|
||||
getOptionsForSavedMetrics(
|
||||
props.savedMetrics,
|
||||
props.value,
|
||||
|
||||
Reference in New Issue
Block a user