flexyford / impagination

A lazy data layer for your paged records
102 stars 7 forks source link

Update (un)load horizons to require record horizon #14

Closed flexyford closed 8 years ago

flexyford commented 8 years ago

Since we want to move the API away from pagination, we request all horizons based on record offsets, instead of page offsets. The requested pages are then internally computed based on pageSize.

The refactor away from pages allowed us to remove the pageOffset which exists on the state since it is no longer important.

The loadHorizon defaults to the pageSize

cowboyd commented 8 years ago

page offset may want to stick around for metadata purposes, but should probably be computed as a get readPageOffset() or some such.

flexyford commented 8 years ago

created a computed as getPageOffset