From d631754b505a2108bb807cf9fb373534ee00884d Mon Sep 17 00:00:00 2001 From: Isaac Wise Date: Sat, 27 Jul 2024 17:45:54 -0500 Subject: [PATCH] Keep any types for selects --- components/InputSelect/CollectionSelection.tsx | 18 +++++++++--------- components/InputSelect/TagSelection.tsx | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/components/InputSelect/CollectionSelection.tsx b/components/InputSelect/CollectionSelection.tsx index 0f708fb..7b0666a 100644 --- a/components/InputSelect/CollectionSelection.tsx +++ b/components/InputSelect/CollectionSelection.tsx @@ -4,17 +4,17 @@ import { useEffect, useState } from "react"; import { styles } from "./styles"; import { Options } from "./types"; import CreatableSelect from "react-select/creatable"; -import Select, { ActionMeta } from "react-select"; +import Select from "react-select"; type Props = { - onChange: (newValue: unknown, actionMeta: ActionMeta) => void; + onChange: any; showDefaultValue?: boolean; defaultValue?: - | { - label: string; - value?: number; - } - | undefined; + | { + label: string; + value?: number; + } + | undefined; creatable?: boolean; }; @@ -107,7 +107,7 @@ export default function CollectionSelection({ components={{ Option: customOption, }} - // menuPosition="fixed" + // menuPosition="fixed" /> ); } else { @@ -123,7 +123,7 @@ export default function CollectionSelection({ components={{ Option: customOption, }} - // menuPosition="fixed" + // menuPosition="fixed" /> ); } diff --git a/components/InputSelect/TagSelection.tsx b/components/InputSelect/TagSelection.tsx index e33cd3a..2ea85e1 100644 --- a/components/InputSelect/TagSelection.tsx +++ b/components/InputSelect/TagSelection.tsx @@ -3,10 +3,9 @@ import { useEffect, useState } from "react"; import CreatableSelect from "react-select/creatable"; import { styles } from "./styles"; import { Options } from "./types"; -import { ActionMeta } from "react-select"; type Props = { - onChange: (newValue: unknown, actionMeta: ActionMeta) => void; + onChange: any; defaultValue?: { value: number; label: string;