We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea1c232 commit f491adfCopy full SHA for f491adf
1 file changed
client/src/features/sessionsV2/components/SessionForm/BuilderSelectorCommon.tsx
@@ -28,7 +28,6 @@ import Select, {
28
type SingleValue,
29
} from "react-select";
30
31
-import { BUILDER_TYPES } from "../../session.constants";
32
import type { BuilderSelectorOption } from "../../sessionsV2.types";
33
34
import styles from "./Select.module.scss";
@@ -57,8 +56,8 @@ export default function BuilderSelectorCommon({
57
56
onChange: onChange_,
58
}: BuilderSelectorCommonProps) {
59
const value = useMemo(
60
- () => BUILDER_TYPES.find(({ value }) => value === value_) ?? defaultValue,
61
- [defaultValue, value_]
+ () => options.find(({ value }) => value === value_) ?? defaultValue,
+ [defaultValue, value_, options]
62
);
63
64
const onChange = useCallback(
0 commit comments