client: autofous when open search

pull/64/head
fantasticit 2022-05-30 12:25:04 +08:00
parent 52ee2a98bb
commit 1233211966
1 changed files with 1 additions and 5 deletions

View File

@ -66,7 +66,6 @@ const List: React.FC<{ data: IDocument[] }> = ({ data }) => {
export const Search = () => {
const [visible, toggleVisible] = useToggle(false);
// const { data: recentDocs } = useRecentDocuments();
const [searchApi, loading] = useAsyncLoading(searchDocument, 10);
const [keyword, setKeyword] = useState('');
const [error, setError] = useState(null);
@ -113,6 +112,7 @@ export const Search = () => {
<div style={{ paddingBottom: 24 }}>
<div>
<Input
autofocus
placeholder={'搜索文档'}
size="large"
value={keyword}
@ -143,10 +143,6 @@ export const Search = () => {
error={error}
normalContent={() => <List data={searchDocs} />}
/>
{/* <div style={{ marginTop: 16 }}>
<Text type="tertiary">访</Text>
<List data={recentDocs} />
</div> */}
</div>
</div>
</Modal>