Fix more types and use logical ANDs
This commit is contained in:
@@ -6,16 +6,6 @@ import { Options } from "./types";
|
||||
import CreatableSelect from "react-select/creatable";
|
||||
import Select, { ActionMeta } from "react-select";
|
||||
|
||||
interface Option {
|
||||
label: string;
|
||||
value: number;
|
||||
ownerId: number;
|
||||
count?: {
|
||||
links: number;
|
||||
};
|
||||
parentId?: number;
|
||||
}
|
||||
|
||||
type Props = {
|
||||
onChange: (newValue: unknown, actionMeta: ActionMeta<unknown>) => void;
|
||||
showDefaultValue?: boolean;
|
||||
@@ -113,7 +103,7 @@ export default function CollectionSelection({
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
styles={styles}
|
||||
defaultValue={showDefaultValue ? defaultValue : null}
|
||||
defaultValue={showDefaultValue && defaultValue}
|
||||
components={{
|
||||
Option: customOption,
|
||||
}}
|
||||
@@ -129,7 +119,7 @@ export default function CollectionSelection({
|
||||
onChange={onChange}
|
||||
options={options}
|
||||
styles={styles}
|
||||
defaultValue={showDefaultValue ? defaultValue : null}
|
||||
defaultValue={showDefaultValue && defaultValue}
|
||||
components={{
|
||||
Option: customOption,
|
||||
}}
|
||||
|
||||
@@ -35,7 +35,6 @@ export default function TagSelection({ onChange, defaultValue }: Props) {
|
||||
options={options}
|
||||
styles={styles}
|
||||
defaultValue={defaultValue}
|
||||
// menuPosition="fixed"
|
||||
isMulti
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user