# react-native-collapsibleflatlist

> CollapsibleFlatList A FlaList is collapsible,it can contain all data in the list,and re-render while data has change

Latest version **0.1.2** (published 2018-02-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-collapsibleflatlist
pnpm add react-native-collapsibleflatlist
yarn add react-native-collapsibleflatlist
bun add react-native-collapsibleflatlist
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-02-27 |
| First published | 2018-02-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 218.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hank121314 |
| Maintainers | hank121314 |
| Keywords | react, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-collapsibleflatlist
- Repository: https://github.com/hank121314/react-native-collapsibleFlatList
- Homepage: https://github.com/hank121314/react-native-collapsibleFlatList#readme
- Issues: https://github.com/hank121314/react-native-collapsibleFlatList/issues
- npm.io page: https://npm.io/package/react-native-collapsibleflatlist

## Dependencies (6)

- [ramda](https://npm.io/package/ramda.md) ^0.25.0
- [react](https://npm.io/package/react.md) 16.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0
- [react-native](https://npm.io/package/react-native.md) 0.52.0
- [react-native-collapsibleflatlist](https://npm.io/package/react-native-collapsibleflatlist.md) ^0.1.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-02-27
- 0.1.1 — 2018-02-21
- 0.1.0 — 2018-02-21

## README

<h1>CollapsibleFlatList</h1>
<p>A FlaList is collapsible,it can contain all data in the list,and re-render while data has change</p>

<h2>Installation</h2>

you can use yarn or npm

```
    npm install react-native-collapsibleflatlist
```

or

```
    yarn add react-native-collapsibleflatlist
```

<h2>Preview</h2>

![alt text](https://drive.google.com/uc?id=1WB2JgPfGfbgoscfG4dZl3wYjNhbv4h53 "Title")

<h2>Usage</h2>

<ul>
    <li>Simple Usage</li>
</ul>


```javascript
/**
 * @flow
 */

import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import HiddenFlatlist from 'react-native-collapsibleflatlist';
import { textStyle } from 'src/utils/styles';

type Props = {};

export default class App extends Component<Props> {
  renderItem = ({ item }) => (
    <View style={{ flex: 1 }}>
      <Text style={textStyle.regular}>{item}</Text>
    </View>
  );

  render() {
    return (
      <View style={styles.container}>
        <View style={styles.innerContainer}>
          <HiddenFlatlist
            ref={ref => (this.list = ref)}
            data={['HaHa', '12312412', 'gwhwhdfns', 'hfndfnewr']}
            ListHeaderComponent={
              <View style={{ flex: 1, backgroundColor: '#fff' }}>
                <Text>Header</Text>
              </View>
            }
            keyExtractor={item => item}
            renderItem={this.renderItem}
            defaultValue={false}
            title={'HiddenList'}
            duration={3000}
            titleStyle={{
              backgroundColor: '#000034',
              borderTopWidth: 1,
              borderBottomWidth: 1,
              borderTopColor: '#fff',
              borderBottomColor: '#fff',
            }}
          />
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#000034',
  },
  innerContainer: {
    marginTop: 64,
  },
});

```

<h2>Prop</h2>
<p>There is some Props can be available.</p>
<table>
    <tr>
        <th>Props</th>
        <th>Description</th>
        <th>Data Type</th>
        <th>Example</th>
    </tr>
    <tr>
        <td>data</td>
        <td>Data for the FlatList</td>
        <td>Array,[]</td>
        <td>['HaHa', '12312412', 'gwhwhdfns', 'hfndfnewr']</td>
    </tr>
    <tr>
        <td>keyExtractor</td>
        <td>keyExtractor for the FlatList</td>
        <td>function</td>
        <td>item=>item</td>
    </tr>
    <tr>
        <td>renderItem</td>
        <td>Takes an item from data and renders it into the list.</td>
        <td>function</td>
        <td></td>
    </tr>
    <tr>
        <td>defaultValue</td>
        <td>default of list is shown up or not.</td>
        <td>boolean</td>
        <td>true</td>
    </tr>
    <tr>
        <td>title</td>
        <td>title of Header</td>
        <td>String</td>
        <td>HiddenList</td>
    </tr>
    <tr>
        <td>titleStyle</td>
        <td>style of title</td>
        <td>style</td>
        <td></td>
    </tr>
    <tr>
        <td>titleTextStyle</td>
        <td>style of title text</td>
        <td>style</td>
        <td></td>
    </tr>
    <tr>
        <td>renderTitle</td>
        <td>render custom title</td>
        <td>ReactComponents</td>
        <td></td>
    </tr>
</table>

<h2>Function</h2>
<p>There is some function that can be used by ref.</p>
<table>
    <tr>
        <th>Function</th>
        <th>Description</th>
        <th>Example</th>
    </tr>
    <tr>
        <td>toggle</td>
        <td>toggle the list</td>
        <td>this.refs.list.toggle()</td>
    </tr>
</table>

<h2>About</h2>
<h3 style="font-weight: normal">Author:hank121314</h3>
<h3>Please let me know,if there is some feature which you want to add!</h3>

---
_Source: https://npm.io/package/react-native-collapsibleflatlist · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
