Giter Site home page Giter Site logo

furkanugurlu / react-native-alphabet-flat-list Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yoonzm/react-native-alphabet-flat-list

0.0 0.0 0.0 25.75 MB

使用FlatList制作的react-native字母选择列表

Home Page: https://github.com/yoonzm/react-native-alphabet-flat-list

License: MIT License

JavaScript 3.12% Ruby 7.83% Objective-C 14.85% Java 6.18% TypeScript 61.15% Starlark 6.87%

react-native-alphabet-flat-list's Introduction

   react-native-alphabet-flat-list    react-native-alphabet-flat-list

Alphabet FlatList

Installation

  • Using npm: npm install @yoonzm/react-native-alphabet-flat-list --save
  • Using Yarn: yarn add @yoonzm/react-native-alphabet-flat-list

Example

import React, {Fragment} from 'react';
import {StatusBar, Text, View} from 'react-native';
import AlphabetFlatList from "react-native-alphabet-flat-list";
import ContactItem, {CONTACT_ITEM_HEIGHT, IContact} from "./ContactItem";

...

const HEADER_HEIGHT = 50;

const App = () => {
  return (
    <Fragment>
      <StatusBar barStyle="dark-content"/>
      <AlphabetFlatList<IContact>
        data={data}
        itemHeight={CONTACT_ITEM_HEIGHT}
        headerHeight={HEADER_HEIGHT}
        renderItem={ContactItem}
        ListHeaderComponent={(
          <View style={{
            height: HEADER_HEIGHT,
            justifyContent: 'center',
            alignItems: 'center'
          }}>
            <Text>ListHeaderComponent</Text>
          </View>
        )}
      />
    </Fragment>
  );
};

Detail

Props

  • data(Object) [isRequire] - listData to display
  • itemHeight(Number) [isRequire] - itemComponent height
  • renderItem(Function) [isRequire] - itemComponent render
  • sectionHeaderHeight(Number) - sectionHeader height; default is 25
  • renderSectionHeader(Function) - sectionHeader
  • ListHeaderComponent(Function) - ListHeader
  • alphabetToast(Boolean) - click on the letter to prompt

Download

类型 二维码
Apk二维码
IOS暂无下载

License

react-native-alphabet-flat-list's People

Contributors

yoonzm avatar furkanugurlu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.