mirror of https://github.com/fantasticit/think.git
client: autofous when open search
This commit is contained in:
parent
52ee2a98bb
commit
1233211966
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue