|
|
|
@ -32,17 +32,16 @@ const options = [{
|
|
|
|
|
}],
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
const CitySwitcher = React.createClass({
|
|
|
|
|
getInitialState() {
|
|
|
|
|
return {
|
|
|
|
|
text: 'Unselect',
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onChange(value, selectedOptions) {
|
|
|
|
|
class CitySwitcher extends React.Component {
|
|
|
|
|
state = {
|
|
|
|
|
text: 'Unselect',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onChange = (value, selectedOptions) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
text: selectedOptions.map(o => o.label).join(', '),
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<span>
|
|
|
|
@ -53,8 +52,8 @@ const CitySwitcher = React.createClass({
|
|
|
|
|
</Cascader>
|
|
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReactDOM.render(<CitySwitcher />, mountNode);
|
|
|
|
|
````
|
|
|
|
|