# @chiyu/react-picker

> react scroll picker

Latest version **1.0.5** (published 2021-03-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install @chiyu/react-picker
pnpm add @chiyu/react-picker
yarn add @chiyu/react-picker
bun add @chiyu/react-picker
```

## 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.0.5 |
| Published | 2021-03-15 |
| First published | 2021-03-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 509.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | 654356282 |
| Maintainers | 654356282 |
| Keywords | react, react picker, scroll picker |

## Links

- npm: https://www.npmjs.com/package/@chiyu/react-picker
- Repository: https://github.com/654356282/react-picker
- Issues: https://github.com/654356282/react-picker/issues
- npm.io page: https://npm.io/package/@chiyu/react-picker

## Dependencies (4)

- [stream](https://npm.io/package/stream.md) ^0.0.2
- [emitter](https://npm.io/package/emitter.md) ^0.0.5
- [styled-components](https://npm.io/package/styled-components.md) ^5.2.1
- [react-transition-group](https://npm.io/package/react-transition-group.md) ^4.4.1

## 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.0.5 (latest) — 2021-03-15
- 1.0.4 — 2021-03-15
- 1.0.3 — 2021-03-14
- 1.0.2 — 2021-03-14
- 1.0.1 — 2021-03-14
- 1.0.0 — 2021-03-14

## README

# @chiyu/react-picker

### how to install?
```bash
npm install @chiyu/react-picker
```

### example
```tsx
import React, { useState } from "react"
import PanelPicker from "@chiyu/react-picker"

const inCascadeData:IInCascadeData[][] = [
    [
        {
            key: 'a1',
            data: 'a1',
            label: 'a1'
        },
        {
            key: 'a2',
            data: 'a2',
            label: 'a2'
        }
    ],
    [
        {
            key: 'b1',
            data: 'b1',
            label: 'b1'
        },
        {
            key: 'b2',
            data: 'b2',
            label: 'b2'
        }
    ],
]

const cascadeData:ICascadeData[] = [
    {
        key: 'a',
        data: 'a',
        lable: 'a',
        children: [
            {
                key: 'a1',
                data: 'a1',
                label: 'a1',
                children: []
            },
            {
                key: 'a2',
                data: 'a2',
                label: 'a2',
                children: []
            }
        ]
    },
    {
        key: 'b',
        data: 'b',
        lable: 'b',
        children: [
            {
                key: 'b1',
                data: 'b1',
                label: 'b1',
                children: []
            },
            {
                key: 'b2',
                data: 'b2',
                label: 'b2',
                children: []
            }
        ]
    }    
]

const App = () => {
  const [open, setOpen] = useState(false)
  function handleChange(values: number[]) {
    console.log(values)
  }
  return (
    <>
      <PanelPicker
        onChange={handleChange}
        cols={2}
        data={inCascadeData}
        cascade={false}
        height={400}
        itemHeight={100}
        open={open}
        onCancel={() => {
          setOpen(false)
        }}
      />
      <button onClick={() => setOpen(true)}>打开</button>
    </>
  )
}

export default hot(App)

```

### demo
```bash
yarn start
```

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