From e7086a66d1e6c1fc2314cb660d92713f1c06bc7a Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 2 Jun 2021 21:15:30 +0300 Subject: [PATCH] update react-select types (#2930) Signed-off-by: Jari Kolehmainen --- package.json | 4 ++-- .../+namespaces/namespace-select-filter.tsx | 2 +- src/renderer/components/select/select.tsx | 6 +++--- yarn.lock | 16 ++++++++-------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 3a03167332..af1d38edc8 100644 --- a/package.json +++ b/package.json @@ -282,7 +282,7 @@ "@types/react-beautiful-dnd": "^13.0.0", "@types/react-dom": "^17.0.0", "@types/react-router-dom": "^5.1.6", - "@types/react-select": "^3.0.13", + "@types/react-select": "3.1.2", "@types/react-table": "^7.7.0", "@types/react-window": "^1.8.2", "@types/readable-stream": "^2.3.9", @@ -349,7 +349,7 @@ "react-beautiful-dnd": "^13.1.0", "react-refresh": "^0.9.0", "react-router-dom": "^5.2.0", - "react-select": "^3.1.0", + "react-select": "3.1.1", "react-select-event": "^5.1.0", "react-table": "^7.7.0", "react-window": "^1.8.5", diff --git a/src/renderer/components/+namespaces/namespace-select-filter.tsx b/src/renderer/components/+namespaces/namespace-select-filter.tsx index ad2c1fe87b..25b14ae9e6 100644 --- a/src/renderer/components/+namespaces/namespace-select-filter.tsx +++ b/src/renderer/components/+namespaces/namespace-select-filter.tsx @@ -33,7 +33,7 @@ import { namespaceStore } from "./namespace.store"; import type { SelectOption, SelectProps } from "../select"; -const Placeholder = observer((props: PlaceholderProps) => { +const Placeholder = observer((props: PlaceholderProps) => { const getPlaceholder = (): React.ReactNode => { const namespaces = namespaceStore.contextNamespaces; diff --git a/src/renderer/components/select/select.tsx b/src/renderer/components/select/select.tsx index 3e5a55cef9..9dd5a61798 100644 --- a/src/renderer/components/select/select.tsx +++ b/src/renderer/components/select/select.tsx @@ -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 { label?: React.ReactNode; } -export interface SelectProps extends ReactSelectProps, CreatableProps { +export interface SelectProps extends ReactSelectProps, CreatableProps { value?: T; themeName?: "dark" | "light" | "outlined" | "lens"; menuClass?: string; @@ -69,7 +69,7 @@ export class Select extends React.Component { return this.props.themeName || ThemeStore.getInstance().activeTheme.type; } - private styles: Styles = { + private styles: Styles = { menuPortal: styles => ({ ...styles, zIndex: "auto" diff --git a/yarn.lock b/yarn.lock index 17da6aeb9e..534b2ed30a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1624,10 +1624,10 @@ "@types/history" "*" "@types/react" "*" -"@types/react-select@^3.0.13": - version "3.0.13" - resolved "https://registry.yarnpkg.com/@types/react-select/-/react-select-3.0.13.tgz#b1a05eae0f65fb4f899b4db1f89b8420cb9f3656" - integrity sha512-JxmSArGgzAOtb37+Jz2+3av8rVmp/3s3DGwlcP+g59/a3owkiuuU4/Jajd+qA32beDPHy4gJR2kkxagPY3j9kg== +"@types/react-select@3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@types/react-select/-/react-select-3.1.2.tgz#38627df4b49be9b28f800ed72b35d830369a624b" + integrity sha512-ygvR/2FL87R2OLObEWFootYzkvm67LRA+URYEAcBuvKk7IXmdsnIwSGm60cVXGaqkJQHozb2Cy1t94tCYb6rJA== dependencies: "@types/react" "*" "@types/react-dom" "*" @@ -12059,10 +12059,10 @@ react-select-event@^5.1.0: dependencies: "@testing-library/dom" ">=7" -react-select@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz#ab098720b2e9fe275047c993f0d0caf5ded17c27" - integrity sha512-wBFVblBH1iuCBprtpyGtd1dGMadsG36W5/t2Aj8OE6WbByDg5jIFyT7X5gT+l0qmT5TqWhxX+VsKJvCEl2uL9g== +react-select@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.1.tgz#156a5b4a6c22b1e3d62a919cb1fd827adb4060bc" + integrity sha512-HjC6jT2BhUxbIbxMZWqVcDibrEpdUJCfGicN0MMV+BQyKtCaPTgFekKWiOizSCy4jdsLMGjLqcFGJMhVGWB0Dg== dependencies: "@babel/runtime" "^7.4.4" "@emotion/cache" "^10.0.9"