Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/react-ant-filter-dropdown-checkbox
Filter dropdown for checkbox.
https://github.com/afeiship/react-ant-filter-dropdown-checkbox
ant checkbox dropdown filter react
Last synced: 8 days ago
JSON representation
Filter dropdown for checkbox.
- Host: GitHub
- URL: https://github.com/afeiship/react-ant-filter-dropdown-checkbox
- Owner: afeiship
- License: mit
- Created: 2020-04-09T11:40:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-23T05:16:01.000Z (almost 4 years ago)
- Last Synced: 2024-11-27T18:32:23.975Z (25 days ago)
- Topics: ant, checkbox, dropdown, filter, react
- Language: JavaScript
- Size: 344 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# react-ant-filter-dropdown-checkbox
> Filter dropdown for checkbox.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-ant-filter-dropdown-checkbox
```## properties
| Name | Type | Required | Default | Description |
| ------------- | ------ | -------- | ------- | ------------------------------------- |
| className | string | false | - | The extended className for component. |
| value | array | false | - | Default value. |
| items | array | false | [] | The dropdown menu items. |
| selectAllText | any | false | '全选' | Select all text. |
| onChange | func | false | noop | The change handler. |## usage
1. import css
```scss
@import "~@jswork/react-ant-filter-dropdown-checkbox/dist/style.css";// or use sass
@import "~@jswork/react-ant-filter-dropdown-checkbox/dist/style.scss";// customize your styles:
$react-ant-filter-dropdown-checkbox-options: ()
```
2. import js
```js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactAntFilterDropdownCheckbox from '@jswork/react-ant-filter-dropdown-checkbox';
import './assets/style.scss';class App extends React.Component {
state = { value: [] };
render() {
const items = [
{ value: 'blank', label: '空白单元格' },
{ value: 'not-filled', label: '未填单元格' },
{ value: 'fixed', label: '已修正' }
];
const { value } = this.state;
return (
{
this.setState({ value: e.target.value });
}}
/>
{JSON.stringify(items, null, 2)}
{JSON.stringify(value, null, 2)}
);
}
}ReactDOM.render(, document.getElementById('app'));
```
## documentation
- https://afeiship.github.io/react-ant-filter-dropdown-checkbox/## license
Code released under [the MIT license](https://github.com/afeiship/react-ant-filter-dropdown-checkbox/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-ant-filter-dropdown-checkbox
[version-url]: https://npmjs.org/package/@jswork/react-ant-filter-dropdown-checkbox[license-image]: https://img.shields.io/npm/l/@jswork/react-ant-filter-dropdown-checkbox
[license-url]: https://github.com/afeiship/react-ant-filter-dropdown-checkbox/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-ant-filter-dropdown-checkbox
[size-url]: https://github.com/afeiship/react-ant-filter-dropdown-checkbox/blob/master/dist/react-ant-filter-dropdown-checkbox.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-ant-filter-dropdown-checkbox
[download-url]: https://www.npmjs.com/package/@jswork/react-ant-filter-dropdown-checkbox