You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -307,9 +307,9 @@ The API for an individual style function looks like this:
307
307
308
308
```js
309
309
/**
310
-
* @param{SystemStyleObject}provided -- The component's default Chakra styles
310
+
* @param{CSSObject}provided -- The component's default Chakra styles
311
311
* @param{Object}state -- The component's current state e.g. `isFocused` (this gives all of the same props that are passed into the component)
312
-
* @returns{SystemStyleObject} An output style object which is forwarded to the component's `sx` prop
312
+
* @returns{CSSObject} An output style object which is forwarded to the component's `sx` prop
313
313
*/
314
314
functionoption(provided, state) {
315
315
return {
@@ -502,7 +502,7 @@ This package has always supported typescript, however until `3.0.0` none of the
502
502
503
503
This package exports all of the named module members of the original `react-select` in case you need their built in types in any of your variable declarations. The root select `Props` type that is exported by `react-select` has been extended using module augmentation,<sup>[[1]](https://react-select.com/typescript#custom-select-props)</sup><sup>[[2]](https://github.com/JedWatson/react-select/issues/4804#issuecomment-927223471)</sup> so if you import that type it will include all of the extra props offered. This package also exports a few custom types that are specific to the custom props offered by this package:
504
504
505
-
- `ChakraStylesConfig` — The type for the prop `chakraStyles` that can be passed to customize the component styles. This is almost identical to the built in `StylesConfig` type, however it uses Chakra's `SystemStyleObject` type instead of react-select's emotion styles.
505
+
- `ChakraStylesConfig` — The type for the prop `chakraStyles` that can be passed to customize the component styles. This is almost identical to the built in `StylesConfig` type, however it uses Chakra's [`CSSObject`](https://github.com/chakra-ui/chakra-ui/blob/790d2417a3f5d59e2d69229a027af671c2dc0cbc/packages/styled-system/src/system.types.ts#L81) type instead of react-select's emotion styles.
506
506
- `OptionBase` — A type for your individual select options that includes the custom props for styling each of your selected options. This type is made to give you a base to extend off of and pass in as a generic to the root `Select` component.
507
507
- Each of the four Select components has a type exported with it:
508
508
- `SelectComponent`
@@ -746,37 +746,37 @@ See this issue for some discussion about using this package with `react-hook-for
746
746
747
747
By default, `react-hook-form` uses [uncontrolled components](https://reactjs.org/docs/uncontrolled-components.html) to reduced input renders however this only works for native HTML inputs. Because chakra-react-select is not a native HTML input, you'll need to use react-hook-form's [`Controller`](https://react-hook-form.com/api/usecontroller/controller) component or [`useController`](https://react-hook-form.com/api/usecontroller) hook in order to keep the value(s) tracked in `react-hook-form`'s state. Here are some examples using each:
748
748
749
-
`Controller` multi select with built-in validation
749
+
#### `Controller` multi select with built-in validation
0 commit comments