Skip to content

Commit

Permalink
fix: pagination example Firestore (#2084)
Browse files Browse the repository at this point in the history
## Description 

Provide a concise summary of the changes made in this pull request.

- 

## Type of PR

Check the appropriate box:

- [ ] Review Fixes
- [ ] Documentation Overhaul
- [ ] Feature/Story
    - Link one or more Engineering Tickets

        * 

- [x] A-Force
- [ ] Error in documentation

## Documentation tickets
 Link to one or more documentation tickets:
 
 - 

## Checklist
Choose only the ones that are applicable.

- [ ] Checked for Grammarly suggestions.
- [ ] Adhered to the writing checklist.
- [ ] Adhered the media checklist.
- [ ] Verified and updated cross-references or added redirect rules.
- [ ] Tested the redirect rules on deploy preview.
- [ ] Validated the modifications made to the content on deploy preview.
- [ ] Validated the CSS modifications on different screen sizes.
  • Loading branch information
harshilp24 authored Feb 1, 2024
1 parent d9c37b1 commit 2f14ffa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions website/docs/connect-data/reference/querying-firestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,16 @@ Sorts query results by a column value. Expects a JSON array containing a single

<dd>

Sets a record that acts as a starting cursor for pagination. Expects an object that is a whole document, i.e. a document that was returned from a prior query. For example, you can pass the last record from the most recent execution of a query:
Sets a record that acts as a starting cursor for pagination in Firestore. Expects an object that is a whole document, i.e. a document that was returned from a prior query. For example, you can pass the last record from the most recent execution of a query:

*Example:*

```javascript
{{ ListQuery.data[ListQuery.data.length - 1] }}
//Table example
{{ user_Table.tableData[user_Table.tableData.length - 1] }}

//List example
{{ users_List.data[users_List.data.length - 1] }}
```

Each time the query is run, it fetches the next set of results that come after the previous execution.
Expand All @@ -102,7 +108,7 @@ Each time the query is run, it fetches the next set of results that come after t
Sets a record that acts as an ending cursor for pagination. Expects an object that is a whole document, i.e. a document that was returned from a prior query. For example, you can pass the first record from the most recent execution of a query:

```javascript
{{ ListQuery.data[0] }}
{{ user_Table.tableData[0] }}
```

When the query is paged backwards, it fetches the set of results that lead up to the current results.
Expand Down

0 comments on commit 2f14ffa

Please sign in to comment.