fix: select same model will clear filename

This commit is contained in:
jialin
2024-10-18 10:59:01 +08:00
parent e10c5e28b5
commit 594c4cd670
4 changed files with 14 additions and 6 deletions
@@ -173,7 +173,9 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
},
[dataSource]
);
const handleSearchInputChange = useCallback((e: any) => {
searchInputRef.current = e.target.value;
}, []);
const handlerSearchModels = useCallback(
async (e: any) => {
searchInputRef.current = e.target.value;
@@ -216,6 +218,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
<>
<SearchInput
onSearch={handlerSearchModels}
onChange={handleSearchInputChange}
modelSource={modelSource}
></SearchInput>
<div className={SearchStyle.filter}>