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:
Mehmet Salih Yavuz
2026-05-04 19:19:36 +03:00
committed by GitHub
parent 28239c18d4
commit 41a22d7918
183 changed files with 5035 additions and 7225 deletions

View File

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