reduce throttle and search bar all fields
This commit is contained in:
parent
f2536d3e92
commit
a7ffc886d3
2 changed files with 5 additions and 3 deletions
|
|
@ -15,11 +15,13 @@ export default function SearchBarController() {
|
|||
e.preventDefault();
|
||||
|
||||
if (location.pathname === '/questions/search') {
|
||||
setSearchParams({ title: search }, { replace: true });
|
||||
setSearchParams({ title: search, text: search, creator: search }, { replace: true });
|
||||
} else {
|
||||
navigate({
|
||||
pathname: '/questions/search',
|
||||
search: `?${createSearchParams({ title: search })}`,
|
||||
search: `?${createSearchParams({
|
||||
title: search, text: search, creator: search
|
||||
})}`,
|
||||
replace: true,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const superagent = require('superagent');
|
|||
const Throttle = require('superagent-throttle');
|
||||
const throttle = new Throttle({
|
||||
active: true,
|
||||
rate: 5,
|
||||
rate: 2,
|
||||
ratePer: 1000,
|
||||
concurrent: 2,
|
||||
});
|
||||
|
|
|
|||
Reference in a new issue