ant-design/components/select/demo/render-panel.md
二货爱吃白萝卜 94edd8e917
refactor: Select like PurePanel remove motion and support auto width (#37117)
* refactor: Pure support open

* chore: fit content size

* test: Update snapshot

* test: back of snapshot

* test: ignore purePanel
2022-08-17 19:57:10 +08:00

987 B

order title debug
999
zh-CN en-US
_InternalPanelDoNotUseOrYouWillBeFired _InternalPanelDoNotUseOrYouWillBeFired
true

zh-CN

调试用组件,请勿直接使用。

en-US

Debug usage. Do not use in your production.

import { Select, Switch, Space } from 'antd';
import React from 'react';

const { _InternalPanelDoNotUseOrYouWillBeFired: InternalSelect } = Select;

const App: React.FC = () => {
  const [open, setOpen] = React.useState(true);

  return (
    <Space direction="vertical" style={{ display: 'flex' }}>
      <Switch checked={open} onChange={() => setOpen(!open)} />
      <InternalSelect
        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;