-
Notifications
You must be signed in to change notification settings - Fork 24.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this.arrayholder.filter is not a function #18184
Labels
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
Comments
Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out? You may safely ignore this if you believe your issue contains all the relevant information. Thank you for your contributions. |
react-native-bot
added
No Template
Ran Commands
One of our bots successfully processed a command.
labels
Mar 4, 2018
|
thanx @jamsch for the quick reply, and sorry for posting this issue here I am totally newbie in this field. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
import React, { Component } from "react";
import { View, Text, FlatList, ActivityIndicator, TouchableOpacity } from "react-native";
import { List, ListItem, SearchBar } from "react-native-elements";
import {Actions } from 'react-native-router-flux';
class FlatListDemo extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.makeRemoteRequest();
}
makeRemoteRequest = () => {
const { page, seed } = this.state;
const url =
https://randomuser.me/api/?seed=${seed}&page=${page}&results=20
;this.setState({ loading: true });
};
handleRefresh = () => {
this.setState(
{
page: 1,
seed: this.state.seed + 1,
refreshing: true
},
() => {
this.makeRemoteRequest();
}
);
};
handleLoadMore = () => {
this.setState(
{
page: this.state.page + 1
},
() => {
this.makeRemoteRequest();
}
);
};
renderSeparator = () => {
return (
<View
style={{
height: 1,
width: "86%",
backgroundColor: "#CED0CE",
marginLeft: "14%"
}}
/>
);
};
SearchFilterFunction(text){
console.log(this.arrayholder);
const newData = this.arrayholder.filter(function(item){
const itemData = item.name.first.toUpperCase()
const textData = text.toUpperCase()
return itemData.indexOf(textData) > -1
})
this.setState({
dataSource: this.state.dataSource.cloneWithRows(newData),
text: text
})
}
renderHeader = () => {
};
renderFooter = () => {
if (!this.state.loading) return null;
};
render() {
return (
<List containerStyle={{ borderTopWidth: 0, borderBottomWidth: 0 }}>
<FlatList
data={this.state.data}
renderItem={({ item }) => (
<ListItem
}
}
export default FlatListDemo;
The text was updated successfully, but these errors were encountered: