2.0.2 • Published 9 months ago

@frankhoodbs/infinite-scroll-cmp v2.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Infinite Scroll Component

A customizable component designed to help with setting up infinite scrolling either on the window or a provided element.

Version License

Props

Prop NameDefault ValueDescription
data-manual-loadfalseBoolean indicating if the control of the items loading should be manual (button) or automatic (scroll)
data-load-callback-Required Function to call to load more items (needs to return a promise)
data-content-finished-Required Booolean that signals the component when there are no more new items to load
data-rootnullThe Element or Document whose bounds are used as the bounding box when testing for intersection.
data-root-margin'0px 0px 0px 0px'A string which specifies a set of offsets to add to the root's bounding_box when calculating intersections.
data-threshold0.10000000149011612Either a single number or an array of numbers between 0.0 and 1.

Slots

NameDescription
defaultSlot that recieves the elements that should be wrapped by the infinite scroll component
manual-loaderSlot for clickable element to fire up manual load (es: buttons), needs slot prop load the function to load items
errorSlot for the html to show if an error occurs
loadingSlot for the animation/spinner to show during loading
content-finishedSlot for the to show if there aren't more content

Events

EventPayload TypeDescription
'loaded'ArrayEmits the value returned from the async function in dataLoader
2.0.2

9 months ago

1.1.12

10 months ago

2.0.1

9 months ago

1.1.11

10 months ago

1.1.9

12 months ago

1.1.10

12 months ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago