mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
update react-select types (#2930)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
9e24ac69ec
commit
e7086a66d1
4 files changed
+14
-14
No files matched your search
@@ -33,7 +33,7 @@ import { namespaceStore } from "./namespace.store";
|
||||
|
||||
import type { SelectOption, SelectProps } from "../select";
|
||||
|
||||
const Placeholder = observer((props: PlaceholderProps<any>) => {
|
||||
const Placeholder = observer((props: PlaceholderProps<any, boolean>) => {
|
||||
const getPlaceholder = (): React.ReactNode => {
|
||||
const namespaces = namespaceStore.contextNamespaces;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import React, { ReactNode } from "react";
|
||||
import { computed, makeObservable } from "mobx";
|
||||
import { observer } from "mobx-react";
|
||||
import { boundMethod, cssNames } from "../../utils";
|
||||
import ReactSelect, { ActionMeta, components, Props as ReactSelectProps, Styles } from "react-select";
|
||||
import ReactSelect, { ActionMeta, components, OptionTypeBase, Props as ReactSelectProps, Styles } from "react-select";
|
||||
import Creatable, { CreatableProps } from "react-select/creatable";
|
||||
import { ThemeStore } from "../../theme.store";
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface SelectOption<T = any> {
|
||||
label?: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface SelectProps<T = any> extends ReactSelectProps<T>, CreatableProps<T> {
|
||||
export interface SelectProps<T = any> extends ReactSelectProps<T, boolean>, CreatableProps<T, boolean> {
|
||||
value?: T;
|
||||
themeName?: "dark" | "light" | "outlined" | "lens";
|
||||
menuClass?: string;
|
||||
@@ -69,7 +69,7 @@ export class Select extends React.Component<SelectProps> {
|
||||
return this.props.themeName || ThemeStore.getInstance().activeTheme.type;
|
||||
}
|
||||
|
||||
private styles: Styles = {
|
||||
private styles: Styles<OptionTypeBase, boolean> = {
|
||||
menuPortal: styles => ({
|
||||
...styles,
|
||||
zIndex: "auto"
|
||||
|
||||
Reference in new issue
Block a user