Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

react native : Display an Accordion inside modal returns an error

$
0
0

In my example I am trying to display Accordion but I get the following error:

"VirtualizedLists should never be nested inside plain ScrollViews withthe same orientation because it can break windowing and otherfunctionality - use another VirtualizedList-backed container instead"

I would be happy for some ways to solve this.

import React from 'react';import {  Modal,   View,} from 'react-native';import { Container, Header, Content, Accordion } from "native-base";export const EarthquakeModal = ({ setModalVisible, modalVisible }) => {  const dataArray = [    { title: "First Element", content: "Lorem ipsum dolor sit amet" },    { title: "Second Element", content: "Lorem ipsum dolor sit amet" },    { title: "Third Element", content: "Lorem ipsum dolor sit amet" }  ];  return (<View style={styles.centeredView}><Modal animationType="slide"        transparent={true}        visible={modalVisible}><View style={styles.centeredView}><Container><Header /><Content padder><Accordion dataArray={dataArray} expanded={0}/></Content></Container></View></Modal></View>  );};

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>