Skip to content

Commit

Permalink
Add debounceTime prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jdlehman committed Aug 26, 2016
1 parent 35083aa commit 196de58
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MyComponent extends Component {
};
return (
<div>
<InputFilter />
<InputFilter debounceTime={200} />
<div>Any amount of content between</div>
<FilterResults
items={items}
Expand Down Expand Up @@ -78,6 +78,10 @@ An input field that controls the state used to render the items in `FilterResult

`onChange` is an optional callback function that is called BEFORE the value in the input field changes via an `onchange` event. It can optionally return a string, which will then be passed directly to `FilterResults` rather than the original string. This can be used to filter out special inputs (eg: `author:jdlehman`) from fuzzy searching. These special inputs could then be used to change the `items` being passed to `FilterResults`.

### debounceTime

`debounceTime` is an optional number that denotes the time in milliseconds to debounce the `onChange` event on the input field. It defaults to 0.


# FilterResults

Expand Down
Loading

0 comments on commit 196de58

Please sign in to comment.