native-x-list
Advanced tools
Comparing version 1.2.3 to 1.3.0
import { ContainerStyleProps } from 'native-x-theme'; | ||
import React, { ReactElement, ReactNode, Ref } from 'react'; | ||
import { FlatList, NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native'; | ||
import { FlatList, NativeScrollEvent, NativeSyntheticEvent, SectionList, StyleProp, ViewStyle } from 'react-native'; | ||
export declare type ListRendererFn<S> = (item: S, index?: number) => ReactElement | null; | ||
@@ -41,6 +41,6 @@ export interface ListProps<S> extends ContainerStyleProps { | ||
} | ||
declare function ListComponent<S>({ items, children, separator, keyExtractor, divider, horizontal, inverted, groupBy, searchBy, searchText, style, onSelectItem, error, emptyMessage, loading, isRefreshing, onRefresh, onFetchNext, numColumns, fill, disabled, onScrollToTopChange, showScrollIndicator, columnWrapperStyle, onScroll, stickySectionHeadersEnabled, maintainVisibleContent, ...props }: ListProps<S>, ref?: Ref<FlatList<S>>): JSX.Element; | ||
declare function ListComponent<S>({ items, children, separator, keyExtractor, divider, horizontal, inverted, groupBy, searchBy, searchText, style, onSelectItem, error, emptyMessage, loading, isRefreshing, onRefresh, onFetchNext, numColumns, fill, disabled, onScrollToTopChange, showScrollIndicator, columnWrapperStyle, onScroll, stickySectionHeadersEnabled, maintainVisibleContent, ...props }: ListProps<S>, ref?: ((instance: FlatList<S> | SectionList<S> | null) => void) | Ref<FlatList<S>> | Ref<SectionList<S>> | null): JSX.Element; | ||
export declare const List: <S>(props: ListProps<S> & { | ||
ref?: ((instance: FlatList<S> | null) => void) | React.RefObject<FlatList<S>> | null | undefined; | ||
ref?: ((instance: FlatList<S> | SectionList<S, import("react-native").DefaultSectionT> | null) => void) | ((instance: FlatList<S> | null) => void) | React.RefObject<FlatList<S>> | ((instance: SectionList<S, import("react-native").DefaultSectionT> | null) => void) | React.RefObject<SectionList<S, import("react-native").DefaultSectionT>> | null | undefined; | ||
}) => ReturnType<typeof ListComponent>; | ||
export {}; |
@@ -8,3 +8,3 @@ /* eslint-disable react-hooks/exhaustive-deps */ | ||
import { COLOR, useContainerStyle, useTheme } from 'native-x-theme'; | ||
import React, { Fragment, useCallback, useEffect, useMemo, useRef, useState, } from 'react'; | ||
import React, { Fragment, useCallback, useEffect, useMemo, useState, } from 'react'; | ||
import { FlatList, SectionList, View, } from 'react-native'; | ||
@@ -76,3 +76,3 @@ import { styles as s } from 'tachyons-react-native'; | ||
function ListComponent({ items, children, separator, keyExtractor, divider, horizontal, inverted, groupBy, searchBy, searchText, style, onSelectItem, error, emptyMessage, loading, isRefreshing = false, onRefresh, onFetchNext, numColumns, fill = false, disabled = false, onScrollToTopChange, showScrollIndicator = true, columnWrapperStyle, onScroll, stickySectionHeadersEnabled, maintainVisibleContent, ...props }, ref) { | ||
const sectionListRef = useRef(); | ||
const sectionListRef = useCombinedRefs([ref || null]); | ||
const listRef = useCombinedRefs([ref || null]); | ||
@@ -79,0 +79,0 @@ const [visibleItems, setVisibleItems] = useState(items); |
{ | ||
"name": "native-x-list", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "List component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23581
275