Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
docs: Added documentation for additional callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidurber committed Dec 26, 2017
1 parent 5c9a3f2 commit 44fa058
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ Picky.propTypes = {
includeSelectAll: PropTypes.bool,
includeFilter: PropTypes.bool,
filterDebounce: PropTypes.number,
dropdownHeight: PropTypes.number
dropdownHeight: PropTypes.number,
onFiltered: PropTypes.func,
onOpen: PropTypes.func,
onClose: PropTypes.func
};
```

Expand All @@ -101,7 +104,9 @@ Picky.propTypes = {
- `includeFilter` - If set to `true` will add an input at the top of the dropdown for filtering the results
- `filterDebounce` - Debounce timeout, used to limit the rate the internal `onFilterChange` gets called. Defaults to 150ms
- `dropdownHeight` - The height of the dropdown. Defaults to 300px.

# Internals
- `onFiltered` - Called after a filter has been done with the filtered options
- `onOpen` - Called after the dropdown has opened.
- `onClose` - Called after the dropdown has closed.
# Internals

The component uses [React Tiny Virtual List](https://github.com/clauderic/react-tiny-virtual-list) for rendering out the items. This is a for a performance gain. You can have 1,000,000 items in the dropdown with no performance drop! It's such a great little library. This is why we have a dropdown height.
15 changes: 12 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Build Status](https://travis-ci.org/Aidurber/react-picky.svg?branch=master)](https://travis-ci.org/Aidurber/react-picky)
[![codecov](https://codecov.io/gh/Aidurber/react-picky/branch/master/graph/badge.svg)](https://codecov.io/gh/Aidurber/react-picky)
[![license](https://img.shields.io/github/license/aidurber/react-picky.svg)]()

# 🚧 Under Construction 🚧

# Picky ☜
Expand Down Expand Up @@ -79,7 +83,10 @@ Picky.propTypes = {
includeSelectAll: PropTypes.bool,
includeFilter: PropTypes.bool,
filterDebounce: PropTypes.number,
dropdownHeight: PropTypes.number
dropdownHeight: PropTypes.number,
onFiltered: PropTypes.func,
onOpen: PropTypes.func,
onClose: PropTypes.func
};
```

Expand All @@ -97,7 +104,9 @@ Picky.propTypes = {
- `includeFilter` - If set to `true` will add an input at the top of the dropdown for filtering the results
- `filterDebounce` - Debounce timeout, used to limit the rate the internal `onFilterChange` gets called. Defaults to 150ms
- `dropdownHeight` - The height of the dropdown. Defaults to 300px.

# Internals
- `onFiltered` - Called after a filter has been done with the filtered options
- `onOpen` - Called after the dropdown has opened.
- `onClose` - Called after the dropdown has closed.
# Internals

The component uses [React Tiny Virtual List](https://github.com/clauderic/react-tiny-virtual-list) for rendering out the items. This is a for a performance gain. You can have 1,000,000 items in the dropdown with no performance drop! It's such a great little library. This is why we have a dropdown height.

0 comments on commit 44fa058

Please sign in to comment.