Skip to content

Commit a68ac00

Browse files
committed
Fix getClassNames bug
1 parent 54adff5 commit a68ac00

File tree

4 files changed

+73
-19
lines changed

4 files changed

+73
-19
lines changed

package-lock.json

Lines changed: 66 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@chakra-ui/menu": "^1.0.0",
4646
"@chakra-ui/spinner": "^1.0.0",
4747
"@chakra-ui/system": "^1.2.0",
48-
"react-select": "^5.3.2"
48+
"react-select": "5.7.0"
4949
},
5050
"peerDependencies": {
5151
"@emotion/react": "^11.8.1",

src/chakra-components/group.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const Group = <
2424
label,
2525
selectProps,
2626
innerProps,
27+
getClassNames,
2728
} = props;
2829

2930
const { chakraStyles } = selectProps;
@@ -40,6 +41,7 @@ const Group = <
4041
cx={cx}
4142
theme={theme}
4243
getStyles={getStyles}
44+
getClassNames={getClassNames}
4345
>
4446
{label}
4547
</Heading>

src/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import type { CommonPropsAndClassName, GroupBase } from "react-select";
22

33
/**
4+
* Clean Common Props
5+
*
46
* Borrowed from the original `react-select` package
57
*
6-
* @see {@link https://github.com/JedWatson/react-select/blob/2d3d6afe18421ea5b6c3f8f0db479ad323c35639/packages/react-select/src/utils.ts#L74}
8+
* @see {@link https://github.com/JedWatson/react-select/blob/edf5265ee0158c026c9e8527a6d0490a5ac2ef23/packages/react-select/src/utils.ts#L75-L110}
79
*/
810
export const cleanCommonProps = <
911
Option,
@@ -23,6 +25,7 @@ export const cleanCommonProps = <
2325
clearValue,
2426
cx,
2527
getStyles,
28+
getClassNames,
2629
getValue,
2730
hasValue,
2831
isMulti,

0 commit comments

Comments
 (0)