chore: search by debounce

This commit is contained in:
jialin
2025-01-03 20:51:22 +08:00
parent 1a792254ca
commit 2a4ebcaf9c
2 changed files with 3 additions and 13 deletions
+2 -2
View File
@@ -147,13 +147,13 @@ const Catalog: React.FC = () => {
fetchData();
};
const handleNameChange = (e: any) => {
const handleNameChange = _.debounce((e: any) => {
setQueryParams({
...queryParams,
page: 1,
search: e.target.value
});
};
}, 350);
const handleCategoryChange = (value: any) => {
setQueryParams({