|
17 | 17 | Inspiration and credit goes to <a href="https://github.com/JedWatson">Jed Watson</a> @github <a href="https://github.com/JedWatson/react-select/issues/3855">issue #3855</a>. |
18 | 18 |
|
19 | 19 | ## β¨ Features |
| 20 | + |
20 | 21 | - isolate re-rendering at your component level |
21 | 22 | - easily integrate with React Hook Form |
22 | 23 | - tiny component |
@@ -73,17 +74,17 @@ function App() { |
73 | 74 |
|
74 | 75 | ## π API |
75 | 76 |
|
76 | | -| Prop | Type | Required | Description | |
77 | | -| :---------- | :-------- | :------: | :-------------------------------------------------------------------------------- | |
78 | | -| `component` | Component | β | Component reference eg: `Select` from `react-select` | |
79 | | -| `setValue` | Function | β | React Hook Form setValue function | |
80 | | -| `register` | Function | β | React Hook Form register function | |
81 | | -| `name` | string | β | Unique name for React Hook Form to register the input | |
82 | | -| `trigger` | boolean | | Should trigger validation | |
83 | | -| `rules` | Object | | Validation rules according to register at React Hook Form | |
84 | | -| `type` | string | | Currently support `checkbox` or `input` input type includes: `radio` and `select` | |
85 | | -| `value` | string | | value can be applied for checkbox | |
86 | | -| `...rest` | Object | | any props assigned will be pass through to your Input component | |
| 77 | +| Prop | Type | Required | Description | |
| 78 | +| :---------- | :-------- | :------: | :--------------------------------------------------------------------------------------------------------------- | |
| 79 | +| `component` | Component | β | Component reference eg: `Select` from `react-select` | |
| 80 | +| `setValue` | Function | β | React Hook Form <a href="https://react-hook-form.com/api#setValue">setValue</a> function | |
| 81 | +| `register` | Function | β | React Hook Form <a href="https://react-hook-form.com/api#register">register</a> function | |
| 82 | +| `name` | string | β | Unique name for React Hook Form to register the input | |
| 83 | +| `trigger` | boolean | | Should trigger validation | |
| 84 | +| `rules` | Object | | Validation rules according to <a href="https://react-hook-form.com/api#register">register</a> at React Hook Form | |
| 85 | +| `type` | string | | Currently support `checkbox` or `input` input type includes: `radio` and `select` | |
| 86 | +| `value` | string | | value can be applied for `checkbox` | |
| 87 | +| `...rest` | Object | | any props assigned will be pass through to your Input component | |
87 | 88 |
|
88 | 89 | ## Contributors |
89 | 90 |
|
|
0 commit comments