Only send search request when string length enough for api expectation.
This commit is contained in:
parent
8b06c3df19
commit
04aa77253f
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ function ChannelContent(props: Props) {
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const timer = setTimeout(() => {
|
const timer = setTimeout(() => {
|
||||||
if (searchQuery === '' || !claimId) {
|
if (searchQuery.trim().length < 3 || !claimId) {
|
||||||
// In order to display original search results, search results must be set to null. A query of '' should display original results.
|
// In order to display original search results, search results must be set to null. A query of '' should display original results.
|
||||||
return setSearchResults(null);
|
return setSearchResults(null);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue