Keep any types for selects
This commit is contained in:
parent
94be3a7448
commit
d631754b50
|
@ -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<unknown>) => 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"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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<unknown>) => void;
|
||||
onChange: any;
|
||||
defaultValue?: {
|
||||
value: number;
|
||||
label: string;
|
||||
|
|
Ŝarĝante…
Reference in New Issue