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

React native flatlist can't render 20 items at ones

$
0
0

I have 20 JSON data set that get using the fetch method and show that in flatlist.

My issue is when I load that data and scroll to the end of list, it scrolls til 13th data only. 7 data won't show. My flatlist does not scroll the end of the data set.

I was attache my screenshot and my source code. if anyone can help me with this issue. is a big help for me. Thanks

Is there any limit flatlist rendering??

enter image description here

class CategoryList extends Component{
  constructor(props) {
    super(props);
  this.state={

    info: [],
    isLoading: true

  };
}
  static navigationOptions = {
    header: {
      visible: false,
    }
  }

  handlePress = async () => {
    fetch('http://209.97.172.234/index.php/testCV/jobCatogoryList', {
        method: 'POST',headers: {
          'Content-Type': 'application/json',
        }

  })
      .then((response) => response.json())
      .then((responseJson) => {
       this.setState({ info: responseJson.data});
      })
      .catch((error) => {
        console.error(error);
      });
  }

  componentDidMount(){
    this.handlePress();
  }

    render() {

 const { info } = this.state;
      return (
<View>
        <Header>
          <TouchableHighlight onPress={() => this.props.navigation.toggleDrawer()} >
            <MyCustomLeftComponent />
          </TouchableHighlight>

          <MyCustomCenterComponent name='Category' />
          <MyCustomRightComponent />
        </Header>
<Card containerStyle={[styles.cardContainer]} >

<SearchBar
  lightTheme
  placeholder='Type Here...' />

<View>

 <FlatList
        data={info.cList}
        renderItem={({ item }) => (
          <ListItem

        title={item.cName}
        badge={{ value: item.cCount, textStyle: { color: 'orange' }}}
          />
        )}
      />

 </View>
    </Card>
    </View>
      );
    }
  }

Viewing all articles
Browse latest Browse all 28468

Trending Articles



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