PowerHorse Engine
    Preparing search index...

    Type Alias InfiniteScrollingFrameProps<T, UID>

    InfiniteScrollingFrameProps: Props<ScrollingFrame> & {
        fetchId?: string;
        fetchItems: fetchItems<T>;
        fetchTotal?: number;
        initialFetchTotal?: number;
        onScrollFetch?: (index: number, fetchItems: fetchItems<T>) => void;
        renderItem: NonNullable<forEachProps<T[], Instance, UID>["children"]>;
        uniqueIdExtractor?: forEachProps<T[], Instance, UID>["uniqueIdExtractor"];
    }

    Type Parameters

    • T
    • UID

    Type Declaration

    • OptionalfetchId?: string

      This is used as a "reset" property. When the fetchId is changed, the current index will be reset back to 0 and all existing rendered items will be removed.

    • fetchItems: fetchItems<T>

      Function for fetching the items

    • OptionalfetchTotal?: number

      How much items will be fetched, defaults to 10.

    • OptionalinitialFetchTotal?: number

      How many items will be fetched on the first requests, defaults to fetchTotal

    • OptionalonScrollFetch?: (index: number, fetchItems: fetchItems<T>) => void

      Override the default behavior when the the scrolling frame is scrolled to the bottom

    • renderItem: NonNullable<forEachProps<T[], Instance, UID>["children"]>

      Function for rendering an item

    • OptionaluniqueIdExtractor?: forEachProps<T[], Instance, UID>["uniqueIdExtractor"]

      Used to generate unique id for each item, this means that if the content unqiue id already exists, the component will not be recreated, only the index will update.