From 8e0ac1ac45e20990f4d868bdbfa7a1a2490e3266 Mon Sep 17 00:00:00 2001 From: Chris Sandvik Date: Thu, 18 Nov 2021 14:33:10 -0500 Subject: [PATCH 1/5] Fix type exports --- src/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.ts b/src/types.ts index 139c063..7d65d00 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,9 +1,9 @@ import { Props, ThemeSpacing } from "react-select"; import { CSSWithMultiValues } from "@chakra-ui/react"; -export { Theme } from "react-select"; +export type { Theme } from "react-select"; -export { RecursiveCSSObject } from "@chakra-ui/react"; +export type { RecursiveCSSObject } from "@chakra-ui/react"; export type Size = "sm" | "md" | "lg"; From b97918ceec60e62510b6e9f6ebf835bf6d3ed162 Mon Sep 17 00:00:00 2001 From: Chris Sandvik Date: Thu, 18 Nov 2021 14:34:10 -0500 Subject: [PATCH 2/5] Fix readme icon link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbd3e3b..dedbae4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![npm - chakra-react-select](https://img.shields.io/npm/v/chakra-react-select "chakra-react-select npm")](https://www.npmjs.com/package/chakra-react-select) [![bundle size - chakra-react-select](https://badgen.net/bundlephobia/min/chakra-react-select "chakra-react-select bundlephobia")](https://bundlephobia.com/result?p=chakra-react-select) [![bundle size - chakra-react-select](https://badgen.net/bundlephobia/minzip/chakra-react-select "chakra-react-select bundlephobia")](https://bundlephobia.com/result?p=chakra-react-select) -[![Total Downloads - chakra-react-select](https://badgen.net/npm/dt/chakra-react-select?color=blue "chakra-react-select npm downloads")](https://bundlephobia.com/result?p=chakra-react-select) +[![Total Downloads - chakra-react-select](https://badgen.net/npm/dt/chakra-react-select?color=blue "chakra-react-select npm downloads")](https://www.npmjs.com/package/chakra-react-select) This component is a wrapper for the popular react component [react-select](https://react-select.com/home) made using the UI library [Chakra UI](https://chakra-ui.com/). From 2628ead70b9bf0759232ec6896f7446a8f4f1220 Mon Sep 17 00:00:00 2001 From: Chris Sandvik Date: Thu, 18 Nov 2021 14:49:24 -0500 Subject: [PATCH 3/5] Fix eslint jsx extensions --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 17d6cd9..04a45b5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -31,7 +31,7 @@ "react/jsx-filename-extension": [ "error", { - "extensions": [".ts", ".tsx"] + "extensions": [".js", ".tsx"] } ] } From 86ecb18022de289bf98df5ef4a6d2833bbe1e521 Mon Sep 17 00:00:00 2001 From: Chris Sandvik Date: Thu, 18 Nov 2021 14:49:42 -0500 Subject: [PATCH 4/5] Fix the `menuPlacement` native react-select prop --- src/chakra-react-select.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/chakra-react-select.tsx b/src/chakra-react-select.tsx index 1d6675d..5d004ef 100644 --- a/src/chakra-react-select.tsx +++ b/src/chakra-react-select.tsx @@ -240,7 +240,15 @@ const chakraComponents: ChakraSelectProps["components"] = { return ; }, // Menu components - Menu: ({ children, innerProps, selectProps: { size } }) => { + Menu: ({ + children, + innerProps, + innerRef, + // @ts-ignore `placement` is not recognized as a prop but it's essential + // for the menu placement (and it is passed) + placement, + selectProps: { size }, + }) => { const menuStyles = useMultiStyleConfig("Menu", {}); const chakraTheme = useTheme(); @@ -252,9 +260,11 @@ const chakraComponents: ChakraSelectProps["components"] = { return ( Date: Thu, 18 Nov 2021 14:56:15 -0500 Subject: [PATCH 5/5] 1.3.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0a500d..308546c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "chakra-react-select", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "1.3.2", + "version": "1.3.3", "license": "MIT", "dependencies": { "@types/react-select": "^4.0.18", diff --git a/package.json b/package.json index 026082f..627976c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chakra-react-select", - "version": "1.3.2", + "version": "1.3.3", "description": "A chakra-ui wrapper for the popular select library react-select", "license": "MIT", "author": "Chris Sandvik ",