Change way to fix #4092

pull/4128/head
afc163 8 years ago
parent 5815ce514a
commit ad911d8dfa

@ -140,6 +140,12 @@ export default class Input extends Component<InputProps, any> {
renderLabledInput(children) { renderLabledInput(children) {
const props = this.props; const props = this.props;
// Not wrap when there is not addons
if (props.type === 'textarea' || (!props.addonBefore && !props.addonAfter)) {
return children;
}
const wrapperClassName = `${props.prefixCls}-group`; const wrapperClassName = `${props.prefixCls}-group`;
const addonClassName = `${wrapperClassName}-addon`; const addonClassName = `${wrapperClassName}-addon`;
const addonBefore = props.addonBefore ? ( const addonBefore = props.addonBefore ? (

@ -8,10 +8,6 @@
.input; .input;
} }
.@{ant-prefix}-input-wrapper {
display: inline-block;
}
//== Style for input-group: input with label, with button or dropdown... //== Style for input-group: input with label, with button or dropdown...
.@{ant-prefix}-input-group { .@{ant-prefix}-input-group {
.input-group(~"@{ant-prefix}-input"); .input-group(~"@{ant-prefix}-input");

Loading…
Cancel
Save