Socket
Socket
Sign inDemoInstall

react-native-accordion-list-view

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-accordion-list-view - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

.idea/misc.xml

2

package.json
{
"name": "react-native-accordion-list-view",
"version": "1.0.3",
"version": "1.0.4",
"description": "Animated accordion collapsable List for react native",

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

@@ -35,2 +35,12 @@ ## react-native-accordion-list-view

## Important Note
This plugin work with Layout Animation and In order to get this to work on Android you need to set the following flags via UIManager:
```javascript
if (Platform.OS === 'android') {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
}
```
### Demo

@@ -63,4 +73,4 @@ <p>

```javascript
import React from 'react';
import {View, SafeAreaView, StyleSheet, Text} from 'react-native';
import React, { useEffect } from 'react';
import {View, SafeAreaView, StyleSheet, Text, Platform, UIManager} from 'react-native';
import {AccordionList} from 'react-native-accordion-list-view';

@@ -81,2 +91,9 @@

];
useEffect(() => {
if (Platform.OS === 'android') {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
}
}, []);
return (

@@ -113,4 +130,4 @@ <SafeAreaView>

|-------------------|--------------------------|-----------|---------------------|--------------------------------------------------------------------------------------------------|
| customTitle | (item) => JSX.Element | Yes | | Function that returns a React element to display as Accordion title |
| customBody | (item) => JSX.Element | Yes | | Function that returns a React element to display as Accordion body |
| customTitle | () => JSX.Element | Yes | | Function that returns a React element to display as Accordion title |
| customBody | () => JSX.Element | Yes | | Function that returns a React element to display as Accordion body |
| customIcon | () => JSX.Element | No | keyboard-arrow-left | Function that returns a React element to display as Accordion icon |

@@ -124,4 +141,4 @@ | containerStyle | ViewStyle | No | {} | Styling for Accordion item container view |

```javascript
import React from 'react';
import {View, SafeAreaView, StyleSheet, Text, ScrollView} from 'react-native';
import React, {useEffect} from 'react';
import {View, SafeAreaView, StyleSheet, Text, ScrollView, Platform, UIManager} from 'react-native';
import {AccordionItem} from 'react-native-accordion-list-view';

@@ -142,2 +159,9 @@

];
useEffect(() => {
if (Platform.OS === 'android') {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
}
}, []);
return (

@@ -144,0 +168,0 @@ <SafeAreaView>

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