Skip to content

Commit

Permalink
docs: add filter prop documentation (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekellyio authored and green-arrow committed Feb 10, 2018
1 parent 726917d commit 78787c9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,28 @@ The `sortOrder` piece can be either `asc` or `desc`. If just a field name is giv
The maximum number of documents to retrieve from the collection.

##### filter

> `array` or `array of array` | defaults to `null`
Passing in an array of strings creates a simple query to filter the collection by
```jsx
<FirestoreCollection
path={"users"}
filter={['firstName', '==', 'Mike']}
render={()=>{/* render stuff*/}}
/>
```

Passing in an array of arrays creates a compound query to filter the collection by
```jsx
<FirestoreCollection
path={"users"}
filter={[['firstName', '==', 'Mike'], ['lastName', '==', 'Smith']]}
render={()=>{/* render stuff*/}}
/>
```

##### render

> function({}) | _required_
Expand Down

0 comments on commit 78787c9

Please sign in to comment.