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??
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>
);
}
}