# react-context-form-select

> react-select integration in react-context-form

Latest version **1.2.2** (published 2022-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-context-form-select
pnpm add react-context-form-select
yarn add react-context-form-select
bun add react-context-form-select
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2022-11-22 |
| First published | 2017-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 52.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexander |
| Maintainers | horat1us |
| Keywords | react-context-form, react, context, forms, react-select, select |

## Links

- npm: https://www.npmjs.com/package/react-context-form-select
- Repository: https://github.com/Horat1us/react-context-form-select
- Homepage: https://github.com/Horat1us/react-context-form-select#readme
- Issues: https://github.com/Horat1us/react-context-form-select/issues
- npm.io page: https://npm.io/package/react-context-form-select

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2022-11-22
- 1.2.1 — 2022-11-22
- 2.0.0-3 — 2019-03-06
- 2.0.0-2 — 2019-03-05
- 2.0.0-1 — 2019-03-05
- 2.0.0-0 — 2019-02-06
- 1.2.0 — 2018-03-25
- 1.1.0 — 2018-03-13
- 1.0.2 — 2018-02-08
- 1.0.1 — 2018-02-08
- 1.0.0 — 2018-02-08
- 1.0.0-rc5 — 2017-12-07
- 1.0.0-rc4 — 2017-12-07
- 1.0.0-rc2 — 2017-12-07
- 1.0.0-rc1 — 2017-12-07

## README

# React Context Form Select
[react-select](https://github.com/JedWatson/react-select) integration with [react-context-form](https://github.com/Horat1us/react-context-form)

## Usage
```typescript
import * as React from "react";
import { Form, FormGroup, SubmitButton } from "react-context-form";
import { Select } from "react-context-form-select";
import { Options } from "react-select";
import { instantiateTestModel } from "./test";

export enum Role = {
    admin: "Admin",
    user: "User",
}  

class RoleSelect extends Select<Role> {};

const options: Options<Role> = Object.values(Role).map((value: string) => return {label: value, value: value});

export const Form: React.SFC<{}> = () => (
    <Form instantiate={instantiateTestModel}>
        <FormGroup name="role">
            <RoleSelect options={options}>
        </FormGroup>
        <SubmitButton loadingComponent={<span>Loading...</span>}>Send</SubmitButton>
    </Form>
)

```

## TODO
- Tests

## License 
[MIT](./LICENSE)

---
_Source: https://npm.io/package/react-context-form-select · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
