You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
783 B

/*
* debug: true
*/
import { AutoComplete, Switch, Space } from 'antd';
import React from 'react';
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalAutoComplete } = AutoComplete;
const App: React.FC = () => {
const [open, setOpen] = React.useState(false);
return (
<Space direction="vertical" style={{ display: 'flex' }}>
<Switch checked={open} onChange={() => setOpen(!open)} />
<InternalAutoComplete
defaultValue="lucy"
style={{ width: 120 }}
open={open}
options={[
{ label: 'Jack', value: 'jack' },
{ label: 'Lucy', value: 'lucy' },
{ label: 'Disabled', value: 'disabled' },
{ label: 'Bamboo', value: 'bamboo' },
]}
/>
</Space>
);
};
export default App;