native-x-list
Advanced tools
Comparing version 1.0.16 to 1.1.0
@@ -7,2 +7,3 @@ import { ContainerStyleProps } from 'native-x-theme'; | ||
items: S[]; | ||
inverted?: boolean; | ||
separator?: ReactNode; | ||
@@ -41,2 +42,2 @@ children: ListRendererFn<S> | Array<ReactElement | ListRendererFn<S> | null>; | ||
} | ||
export declare function List<S>({ items, children, separator, keyExtractor, divider, horizontal, groupBy, searchBy, searchText, style, onSelectItem, error, emptyMessage, loading, isRefreshing, onRefresh, onFetchNext, numColumns, fill, disabled, onScrollToTopChange, showScrollIndicator, columnWrapperStyle, onScroll, stickySectionHeadersEnabled, maintainVisibleContent, ...props }: ListProps<S>): JSX.Element; | ||
export declare function List<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>): JSX.Element; |
@@ -74,3 +74,3 @@ /* eslint-disable react-hooks/exhaustive-deps */ | ||
} | ||
export function List({ items, children, separator, keyExtractor, divider, horizontal, groupBy, searchBy, searchText, style, onSelectItem, error, emptyMessage, loading, isRefreshing = false, onRefresh, onFetchNext, numColumns, fill = false, disabled = false, onScrollToTopChange, showScrollIndicator = true, columnWrapperStyle, onScroll, stickySectionHeadersEnabled = true, maintainVisibleContent, ...props }) { | ||
export function List({ 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 = true, maintainVisibleContent, ...props }) { | ||
const sectionListRef = useRef(); | ||
@@ -194,8 +194,8 @@ const listRef = useRef(); | ||
if (sections != undefined) { | ||
list = (React.createElement(SectionList, { ref: sectionListRef, windowSize: 100, maxToRenderPerBatch: 100, stickySectionHeadersEnabled: stickySectionHeadersEnabled, style: listStyle, keyExtractor: idExtractor, sections: sections, renderItem: renderItem, refreshing: isRefreshing, horizontal: horizontal, onRefresh: onRefresh, renderSectionHeader: renderSectionHeader, ListEmptyComponent: renderEmptyComponent, renderSectionFooter: renderSectionFooter, ItemSeparatorComponent: renderItemSeparator, ListHeaderComponent: ListHeaderComponent, ListFooterComponent: ListFooterComponent, onEndReached: onFetchNext, scrollEnabled: !disabled, keyboardShouldPersistTaps: 'always', keyboardDismissMode: 'on-drag', contentContainerStyle: contentContainerStyle, showsHorizontalScrollIndicator: showScrollIndicator, showsVerticalScrollIndicator: showScrollIndicator, onScroll: onScroll, scrollEventThrottle: SCROLL_EVENT_THROTTLE, onEndReachedThreshold: ON_END_REACHED_THRESHOLD, scrollIndicatorInsets: scrollIndicatorInsets })); | ||
list = (React.createElement(SectionList, { ref: sectionListRef, windowSize: 100, maxToRenderPerBatch: 100, stickySectionHeadersEnabled: stickySectionHeadersEnabled, style: listStyle, keyExtractor: idExtractor, sections: sections, renderItem: renderItem, refreshing: isRefreshing, horizontal: horizontal, inverted: inverted, onRefresh: onRefresh, renderSectionHeader: renderSectionHeader, ListEmptyComponent: renderEmptyComponent, renderSectionFooter: renderSectionFooter, ItemSeparatorComponent: renderItemSeparator, ListHeaderComponent: ListHeaderComponent, ListFooterComponent: ListFooterComponent, onEndReached: onFetchNext, scrollEnabled: !disabled, keyboardShouldPersistTaps: 'always', keyboardDismissMode: 'on-drag', contentContainerStyle: contentContainerStyle, showsHorizontalScrollIndicator: showScrollIndicator, showsVerticalScrollIndicator: showScrollIndicator, onScroll: onScroll, scrollEventThrottle: SCROLL_EVENT_THROTTLE, onEndReachedThreshold: ON_END_REACHED_THRESHOLD, scrollIndicatorInsets: scrollIndicatorInsets })); | ||
} | ||
else { | ||
list = (React.createElement(FlatList, { ref: listRef, style: listStyle, keyExtractor: idExtractor, data: visibleItems, renderItem: renderItem, refreshing: isRefreshing, horizontal: horizontal, onRefresh: onRefresh, onEndReached: onFetchNext, contentContainerStyle: contentContainerStyle, ItemSeparatorComponent: renderItemSeparator, keyboardShouldPersistTaps: 'always', keyboardDismissMode: 'on-drag', numColumns: numColumns, scrollEnabled: !disabled, columnWrapperStyle: numColumns && numColumns > 1 ? columnWrapperStyle : undefined, ListHeaderComponent: ListHeaderComponent, ListFooterComponent: ListFooterComponent, ListEmptyComponent: renderEmptyComponent, showsHorizontalScrollIndicator: showScrollIndicator, showsVerticalScrollIndicator: showScrollIndicator, onScroll: onScroll, scrollEventThrottle: SCROLL_EVENT_THROTTLE, onEndReachedThreshold: ON_END_REACHED_THRESHOLD, scrollIndicatorInsets: scrollIndicatorInsets, maintainVisibleContentPosition: maintainVisibleContent ? maintainVisibleContentPosition : undefined })); | ||
list = (React.createElement(FlatList, { ref: listRef, style: listStyle, keyExtractor: idExtractor, data: visibleItems, renderItem: renderItem, refreshing: isRefreshing, horizontal: horizontal, inverted: inverted, onRefresh: onRefresh, onEndReached: onFetchNext, contentContainerStyle: contentContainerStyle, ItemSeparatorComponent: renderItemSeparator, keyboardShouldPersistTaps: 'always', keyboardDismissMode: 'on-drag', numColumns: numColumns, scrollEnabled: !disabled, columnWrapperStyle: numColumns && numColumns > 1 ? columnWrapperStyle : undefined, ListHeaderComponent: ListHeaderComponent, ListFooterComponent: ListFooterComponent, ListEmptyComponent: renderEmptyComponent, showsHorizontalScrollIndicator: showScrollIndicator, showsVerticalScrollIndicator: showScrollIndicator, onScroll: onScroll, scrollEventThrottle: SCROLL_EVENT_THROTTLE, onEndReachedThreshold: ON_END_REACHED_THRESHOLD, scrollIndicatorInsets: scrollIndicatorInsets, maintainVisibleContentPosition: maintainVisibleContent ? maintainVisibleContentPosition : undefined })); | ||
} | ||
return React.createElement(View, { style: fill && styles.container }, list); | ||
} |
{ | ||
"name": "native-x-list", | ||
"version": "1.0.16", | ||
"version": "1.1.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
22276
250