Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
searchable-flatlist
Advanced tools
Wrapper component over Flatlist component to provide search functionality.
Wrapper component over Flatlist component to provide search functionality.
npm install --save searchable-flatlist
import React, { Component } from "react";
import { StyleSheet, Text, View, TextInput } from "react-native";
import SearchableFlatlist from "searchable-flatlist";
const data = [
{ id: 1, name: "Francesco Raoux" },
{ id: 2, name: "Tasha Bonanno" },
{ id: 3, name: "Merle Braunstein" },
{ id: 4, name: "Aleda Bouzan" },
{ id: 5, name: "Issiah Elnaugh" }
];
export default class App extends Component {
state = { searchTerm: "" };
render() {
let { sContainer, sSearchBar, sTextItem } = styles;
return (
<View style={sContainer}>
<TextInput
placeholder={"Search"}
style={sSearchBar}
onChangeText={searchTerm => this.setState({ searchTerm })}
/>
<SearchableFlatlist
searchProperty={"name"}
searchTerm={this.state.searchTerm}
data={data}
containerStyle={{ flex: 1 }}
renderItem={({ item }) => <Text style={sTextItem}>{item.name}</Text>}
keyExtractor={item => item.id}
/>
</View>
);
}
}
const styles = StyleSheet.create({
sContainer: {
flex: 1,
backgroundColor: "#F5FCFF"
},
sTextItem: {
height: 50,
width: "100%",
textAlign: "center",
textAlignVertical: "center",
fontSize: 18
},
sSearchBar: {
paddingHorizontal: 10,
margin: 10,
height: 50,
borderColor: "gray",
borderWidth: 1,
fontSize: 18
}
});
Props | Description | Value | Required |
---|---|---|---|
data | data for flatlist | object array | :heavy_check_mark: |
searchProperty | property of the object to be searched | string | :heavy_check_mark: |
searchTerm | searching term | string | :heavy_check_mark: |
type | type of search | one of the following SearchableFlatlist.WORDS SearchableFlatlist.INCLUDES | :heavy_multiplication_x: |
SearchableFlatlist.WORDS
- search words
SearchableFlatlist.INCLUDES
- search everything (default)
FAQs
Wrapper component over Flatlist component to provide search functionality.
The npm package searchable-flatlist receives a total of 6 weekly downloads. As such, searchable-flatlist popularity was classified as not popular.
We found that searchable-flatlist demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.