New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lang0909/react-native-alpha-flat-list

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lang0909/react-native-alpha-flat-list

A simple and fully customizable React Native component that implements Alphabetical List

  • 0.0.36
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

lang0909 Fork Version

React Native Alpha Flat List

A simple and fully customizable React Native component that implements Alphabetical List

version for lang0909

Getting Started

$ npm install --save @lang0909/react-native-alpha-flat-list

Example

Usage

Import the AlphaFlatList component from react-native-alpha-flat-list and use it like so:

import React from "react";
import { SafeAreaView, View, Text } from "react-native";

import AlphaFlatList from "react-native-alpha-flat-list";

const ITEM_HEIGHT = 20;

const items = Array.from({ length: 500 }, () => {
  return {
    id: "_" + Math.random().toString(36).substr(2, 9),
    name: Math.random().toString(36).substring(7).replace(/[0-9]/g, ""),
  };
});

const data = items.sort((previous, next) =>
  previous.name.localeCompare(next.name)
);

export default function App() {
  const renderItem = ({ item }) => (
    <View style={{ height: ITEM_HEIGHT, paddingLeft: 20 }}>
      <Text>{item.name}</Text>
    </View>
  );

  const keyExtractor = ({ id }) => id;

  return (
    <SafeAreaView style={{ flex: 1 }}>
      <AlphaFlatList
        data={data}
        initialNumToRender={data.length}
        keyExtractor={keyExtractor}
        renderItem={renderItem}
        itemHeight={ITEM_HEIGHT}
        listStyle={{ paddingLeft: 10 }}
        sidebarLetterStyle={{ fontWeight: "bold" }}
        sidebarLetterActiveStyle={{ color: "red" }}
      />
    </SafeAreaView>
  );
}

Keywords

FAQs

Package last updated on 14 Jul 2022

Did you know?

Socket

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.

Install

Related posts

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