@profiscience/knockout-contrib-bindings-infinite-scroll
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

bindings.infiniteScroll

Version Dependency Status Peer Dependency Status Dev Dependency Status Downloads

This package is intended for consumption via the @profiscience/knockout-contrib metapackage

Call a function when the end of an element is reached

Usage

<div data-bind="foreach: todos, infiniteScroll: fetchMoreTodos">...</div>

with a custom offset

By default the infinite scroll will trigger 1500px before reaching the bottom of the bound element. This can be customized, for example to preload slower APIs sooner you could define a larger offset.

<div
  data-bind="foreach: todos, infiniteScroll: { handler: fetchMoreTodos, offset: 2000 }"
>
  ...
</div>

Dependents (1)

Package Sidebar

Install

npm i @profiscience/knockout-contrib-bindings-infinite-scroll

Weekly Downloads

7

Version

1.1.2

License

WTFPL

Unpacked Size

18.9 kB

Total Files

11

Last publish

Collaborators

  • dorgeron
  • barsh