细节优化
This commit is contained in:
@@ -46,11 +46,11 @@ const QueryTransactions = () => {
|
||||
getSearchHistory();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (ref?.current) {
|
||||
ref.current.focus();
|
||||
}
|
||||
}, [ref.current]);
|
||||
// useEffect(() => {
|
||||
// if (ref?.current) {
|
||||
// ref.current.focus();
|
||||
// }
|
||||
// }, [ref.current]);
|
||||
|
||||
useReachBottom(() => {
|
||||
if (load_transactions_params.page >= totalpages) return;
|
||||
@@ -99,7 +99,8 @@ const QueryTransactions = () => {
|
||||
/**
|
||||
* @description 点击清空输入内容
|
||||
*/
|
||||
const handleClear = () => {
|
||||
const handleClear = (e) => {
|
||||
e.stopPropagation();
|
||||
setKeyword("");
|
||||
setTransactions([]);
|
||||
set_load_transactions_params((prev) => {
|
||||
@@ -247,7 +248,7 @@ const QueryTransactions = () => {
|
||||
defaultValue={keyword}
|
||||
onChange={handleChange}
|
||||
onClear={handleClear}
|
||||
autoFocus
|
||||
onBlur={() => {setKeyword(load_transactions_params.keyword)}}
|
||||
clearable={false}
|
||||
ref={ref}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user