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

react-native-complete-flatlist

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-complete-flatlist - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

31

index.js

@@ -11,9 +11,8 @@ import React from 'react';

Animated,
} from "react-native";
} from 'react-native';
class CompleteFlatList extends React.Component {
state = {
behavior: "padding",
refreshing: false,
searchText: "",
searchText: '',
rowScale: new Animated.Value(0),

@@ -32,3 +31,3 @@ slide: new Animated.Value(0),

onSearch: null,
highlightColor: "",
highlightColor: '',
backgroundStyles: {},

@@ -69,8 +68,7 @@ searchTextInputStyle: {},

this.setState({ refreshing: true });
setTimeout(() => {
this.setState({ refreshing: false });
}, 7000);
setTimeout(() => this.setState({ refreshing: false }), 7000);
};
refresh = () => {
let filtereddata = null;
if (this.props.data.length === 0) {

@@ -85,3 +83,3 @@ filtereddata = [{ type: "emptyrow", name: "No data available" }];

const { data, searchKey, highlightColor, onSearch } = this.props;
if (this.state.searchText === "" || onSearch !== null) {
if (this.state.searchText === '' || onSearch !== null) {
return data;

@@ -195,9 +193,7 @@ }

return (
<View
behavior={this.state.behavior}
style={[styles.container, backgroundStyles]}
>
<View style={[styles.container, backgroundStyles]}>
{showSearch && searchbar}
{this.props.elementBetweenSearchAndList}
<FlatList
style={{ height: '100%' }}
ItemSeparatorComponent={renderSeparator}

@@ -209,13 +205,7 @@ scrollEventThrottle={16}

onSearch !== null ? (
<RefreshControl
refreshing={isRefreshing}
onRefresh={() => onSearch(searchText)}
/>
<RefreshControl refreshing={isRefreshing} onRefresh={() => onSearch(searchText)} />
)
:
pullToRefreshCallback !== null ? (
<RefreshControl
refreshing={isRefreshing}
onRefresh={pullToRefreshCallback}
/>
<RefreshControl refreshing={isRefreshing} onRefresh={pullToRefreshCallback} />
) : null

@@ -264,2 +254,3 @@ }

flex: 1,
height: '100%',
justifyContent: "center",

@@ -266,0 +257,0 @@ alignItems: "center",

{
"name": "react-native-complete-flatlist",
"version": "2.0.2",
"version": "2.0.3",
"description": "An extension of React Native's Flatlist with search bar, highlighted search, pull to refresh, and etc is ready to use",

@@ -5,0 +5,0 @@ "main": "index.js",

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