mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
Destructuring for the win.
This commit is contained in:
parent
335eb0c246
commit
73d7e816b1
@ -15,8 +15,7 @@ Using `OptGroup` to group the options.
|
||||
|
||||
````jsx
|
||||
import { Select } from 'antd';
|
||||
const Option = Select.Option;
|
||||
const OptGroup = Select.OptGroup;
|
||||
const { Option, OptGroup } = Select;
|
||||
|
||||
function handleChange(value) {
|
||||
console.log(`selected ${value}`);
|
||||
|
Loading…
Reference in New Issue
Block a user