mirror of
https://github.com/Blair-SGA-Dev-Team/blazerapp.git
synced 2024-11-21 20:41:16 -05:00
Fixed weird search bar issue
This commit is contained in:
parent
d371f9016e
commit
b04ed35c6d
|
@ -68,6 +68,9 @@ class Clubs extends React.Component {
|
|||
this.setState({ search:search });
|
||||
ds = this.state.dataSearch.filter((thing)=>{return thing.name.startsWith(search)})
|
||||
this.setState({dataSearch: ds})
|
||||
if (search == ""){
|
||||
this.setState({dataSearch:this.state.data})
|
||||
}
|
||||
};
|
||||
clearSearch = (search)=>{
|
||||
ds = this.state.data;
|
||||
|
@ -84,6 +87,7 @@ class Clubs extends React.Component {
|
|||
lightTheme
|
||||
placeholder="Type Here..."
|
||||
onChangeText={this.updateSearch}
|
||||
onCancel={this.clearSearch}
|
||||
onClear={this.clearSearch}
|
||||
value={this.state.search}/>
|
||||
<FlatList
|
||||
|
|
Loading…
Reference in New Issue
Block a user