Fix some any types
This commit is contained in:
@@ -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 from "react-select";
|
||||
import Select, { ActionMeta } from "react-select";
|
||||
|
||||
type Props = {
|
||||
onChange: any;
|
||||
onChange: (newValue: unknown, actionMeta: ActionMeta<unknown>) => void;
|
||||
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,9 +3,10 @@ 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: any;
|
||||
onChange: (newValue: unknown, actionMeta: ActionMeta<unknown>) => void;
|
||||
defaultValue?: {
|
||||
value: number;
|
||||
label: string;
|
||||
|
||||
Reference in New Issue
Block a user