update code style

This commit is contained in:
afc163 2016-10-18 18:10:41 +08:00
parent 2fe4590887
commit 6f8f7de69e

View File

@ -307,7 +307,8 @@ export default class Cascader extends React.Component<CascaderProps, any> {
dropdownMenuColumnStyle.width = this.refs.input.refs.input.offsetWidth;
}
return (
<RcCascader {...props}
<RcCascader
{...props}
options={options}
value={value}
popupVisible={state.popupVisible}
@ -320,7 +321,8 @@ export default class Cascader extends React.Component<CascaderProps, any> {
style={style}
className={pickerCls}
>
<Input {...inputProps}
<Input
{...inputProps}
ref="input"
placeholder={value && value.length > 0 ? null : placeholder}
className={`${prefixCls}-input ${sizeCls}`}
@ -332,7 +334,9 @@ export default class Cascader extends React.Component<CascaderProps, any> {
onBlur={showSearch ? this.handleInputBlur : null}
onChange={showSearch ? this.handleInputChange : null}
/>
<span className={`${prefixCls}-picker-label`}>{this.getLabel()}</span>
<span className={`${prefixCls}-picker-label`}>
{this.getLabel()}
</span>
{clearIcon}
<Icon type="down" className={arrowCls} />
</span>