# react-searchable-selectfield

> > React Searchable Select Field

Latest version **1.2.4** (published 2023-07-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-searchable-selectfield
pnpm add react-searchable-selectfield
yarn add react-searchable-selectfield
bun add react-searchable-selectfield
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2023-07-12 |
| First published | 2023-04-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 63.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Achyut Paudel |
| Maintainers | achyutatp |
| Keywords | react, typescript, react-searchable-selectfield, react-search, react search field, react search select |

## Links

- npm: https://www.npmjs.com/package/react-searchable-selectfield
- npm.io page: https://npm.io/package/react-searchable-selectfield

## Dependencies (1)

- [react-use](https://npm.io/package/react-use.md) ^17.4.0

## 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.4 (latest) — 2023-07-12
- 1.2.3 — 2023-07-12
- 1.2.2 — 2023-04-23
- 1.2.1 — 2023-04-23
- 1.1.9 — 2023-04-22
- 1.1.8 — 2023-04-21
- 1.1.7 — 2023-04-21
- 1.1.6 — 2023-04-21
- 1.1.5 — 2023-04-21
- 1.1.3 — 2023-04-21
- 1.1.2 — 2023-04-21
- 1.1.1 — 2023-04-21
- 1.1.0 — 2023-04-21
- 1.0.9 — 2023-04-21
- 1.0.8 — 2023-04-21
- … 8 more at https://npm.io/package/react-searchable-selectfield/versions

## README

# React Searchable Field - React.js Component

> React Searchable Select Field

## Install

```bash
npm install --save react-searchable-selectfield

or,

yarn add react-searchable-selectfield
```

## Usage

```tsx
import React, { useState } from "react"
import { SelectField } from 'react-searchable-selectfield'
// If css is not being loaded
import 'react-searchable-selectfield/dist/index.css' 

const App = () => {
    const [selecteData, setSelecteData] = useState({});

    const options = [
      { value: 'chocolate', label: 'Chocolate' },
      { value: 'strawberry', label: 'Strawberry' },
      { value: 'vanilla', label: 'Vanilla' },
    ];

    const onChange = (data: { label: String, value: string }) => {
        setSelecteData(data);
    }
    console.log(selecteData);

    return (
        <form>
           <SelectField
             labelName='Foods'
             name='example'
             onChange={onChange}
            />
        </form>
    )
}

export default App;
```

## Suppported Props:
```
    className?: string;
    btnClassName?: string;
    labelName?: string;
    hoverInfo?: string;
    name: string;
    options: { label: string, value: string }[];
    placeholder?: string
    onChange: (data: { label: string, value: string }) => void;
    isEditable?: boolean
    pending?: boolean;
    defaultValue?: string
    isTableMode?: boolean
    isDisabled?: boolean
    fallBackPath?: string
    children?: React.ReactElement
    handleRouteClick?: () => void
    parentClassName?: string
    notFoundText?: string
    style?: React.CSSProperties
```

## License

ISC © [https://github.com/AchyutPL](https://github.com/AchyutPL)

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