import Radio from '../../radio'; import React from 'react'; import ReactDOM from 'react-dom'; import Select from '..'; interface PageStates { value: string; fillProps: string; placeholder: string; } class DemoWithFillProps extends React.Component<{}, PageStates> { handleCtrlChange: (fillProps: any) => void; handleChange: (value: any) => void; constructor(props) { super(props); this.state = { value: '', fillProps: 'value', placeholder: 'Fill with value', }; this.handleCtrlChange = fillProps => { this.setState({ fillProps, value: '', placeholder: `Fill with ${fillProps}`, }); }; this.handleChange = value => { this.setState({ value }); }; } render() { const dataSource = [ { value: 'Hang Meimei', label: '韩梅梅' }, { value: 'Gao Hui', label: '高辉' }, { value: 'Zhang San', label: '张三' }, { value: 'Li Si', label: '李四' }, { value: 'Wang Wu', label: '王五' }, { value: 'Sun Yang', label: '孙杨' }, ]; return (
value label ); }; ReactDOM.render(
, document.getElementById('select-demo-7'), );