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
@@ -8,9 +8,10 @@ import { modelSourceMap, modelSourceValueMap } from '../config';
const SearchInput: React.FC<{
modelSource: string;
onChange: (e: any) => void;
onSearch: (e: any) => void;
}> = (props) => {
const { onSearch, modelSource } = props;
const { onSearch, onChange, modelSource } = props;
const intl = useIntl();
const inputRef = useRef<any>(null);
@@ -23,6 +24,7 @@ const SearchInput: React.FC<{
<Input
ref={inputRef}
onPressEnter={onSearch}
onChange={onChange}
allowClear
placeholder={intl.formatMessage(
{