Releases: flexyford/impagination
Releases · flexyford/impagination
v1.0.0
Lazy Interfaces / New API
See Migration Guide for upgrading version 0.x.x
-> 1.0.0-alpha.3.
This is a pre-release. i've thought for many months on this improved API, but please leave any feedback in Github Issues
New API
Version 1.0
contains new API methods and API Changes. Please Review before upgrading
Updating the Dataset (UPGRADE API)
Actions | Parameters | Description |
---|---|---|
refilter | [filterCallback] | Reapplies the filter for all resolved pages. If filterCallback is provided, applies and sets the new filter. |
reset | [offset] | Unfetches all pages and clears the state . If offset is provided, fetches records starting at offset . |
setReadOffset | [offset] | Sets the readOffset and fetches records resuming at offset |
Updating the State (NEW API)
Actions | Parameters | Defaults | Description |
---|---|---|---|
post | data, index | index = 0 | Inserts data into state at index . |
put | data, index | index = state.readOffset | Merges data into record at index . |
delete | index | index= state.readOffset | Deletes data from state at index . |
Reading the State (UPGRADE API)
Functions | Description |
---|---|
state[index] | Returns the Record Object at index |
state.getRecord(index) | Returns the Record Object at index |
state.getPage(offset) | Returns the Page Object at page number offset |