mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
add loading to category and license
This commit is contained in:
parent
69365d3d93
commit
c28974f019
@ -139,12 +139,11 @@ class Search extends PureComponent<SearchProps, SearchState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private pendingSearch = () => {
|
private pendingSearch = () => {
|
||||||
this.setState({isLoading:true},()=>{
|
this.setState({isLoading:true})
|
||||||
if(this.timeout){
|
if(this.timeout){
|
||||||
clearTimeout(this.timeout)
|
clearTimeout(this.timeout)
|
||||||
}
|
}
|
||||||
this.timeout = setTimeout(this.executeSearch,250);
|
this.timeout = setTimeout(this.executeSearch,500);
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private executeSearch=()=>{
|
private executeSearch=()=>{
|
||||||
@ -153,11 +152,11 @@ class Search extends PureComponent<SearchProps, SearchState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setCategory = (category: string) => {
|
public setCategory = (category: string) => {
|
||||||
this.setState({ category }, () => this.searchAssets())
|
this.setState({ category, isLoading: true }, () => this.searchAssets())
|
||||||
}
|
}
|
||||||
|
|
||||||
public setLicense = (license: string) => {
|
public setLicense = (license: string) => {
|
||||||
this.setState({ license }, () => this.searchAssets())
|
this.setState({ license, isLoading: true }, () => this.searchAssets())
|
||||||
}
|
}
|
||||||
|
|
||||||
public renderResults = () =>
|
public renderResults = () =>
|
||||||
|
Loading…
Reference in New Issue
Block a user