Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-infinite-scroller

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-infinite-scroller

TypeScript definitions for react-infinite-scroller

  • 1.2.5
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
356K
increased by9.57%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/react-infinite-scroller

Summary

This package contains type definitions for react-infinite-scroller (https://github.com/CassetteRocks/react-infinite-scroller).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-infinite-scroller.

index.d.ts

import * as React from "react";

declare namespace InfiniteScroll {
    /**
     * <InfiniteScroll /> properties.
     */
    interface InfiniteScrollProps extends React.HTMLProps<InfiniteScroll> {
        /**
         * Name of the element that the component should render as.
         * Defaults to 'div'.
         */
        element?: React.ReactNode | string | undefined;
        /**
         * Whether there are more items to be loaded. Event listeners are removed if false.
         * Defaults to false.
         */
        hasMore?: boolean | undefined;
        /**
         * Whether the component should load the first set of items.
         * Defaults to true.
         */
        initialLoad?: boolean | undefined;
        /**
         * Whether new items should be loaded when user scrolls to the top of the scrollable area.
         * Default to false.
         */
        isReverse?: boolean | undefined;
        /**
         * A callback for when more items are requested by the user.
         * Page param is next page index.
         */
        loadMore(page: number): void;
        /**
         * The number of the first page to load, with the default of 0, the first page is 1.
         * Defaults to 0.
         */
        pageStart?: number | undefined;
        /**
         * The distance in pixels before the end of the items that will trigger a call to loadMore.
         * Defaults to 250.
         */
        threshold?: number | undefined;
        /**
         * Proxy to the useCapture option of the added event listeners.
         * Defaults to false.
         */
        useCapture?: boolean | undefined;
        /**
         * Add scroll listeners to the window, or else, the component's parentNode.
         * Defaults to true.
         */
        useWindow?: boolean | undefined;
        /**
         * Loader component for indicating "loading more".
         */
        loader?: React.ReactElement | undefined;
        /**
         * Override method to return a different scroll listener if it's not the immediate parent of InfiniteScroll.
         */
        getScrollParent?(): HTMLElement | null;
    }
    class InfiniteScroll extends React.Component<InfiniteScrollProps> {
        getParentElement(elem?: HTMLElement | null): HTMLElement | undefined | null;
    }
    namespace InfiniteScroll {}
}

export = InfiniteScroll.InfiniteScroll;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Lauri Lavanti, Piotr Srebniak, Brett Miller, and Yipeng Zhao.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc