diff --git a/components/input/Input.tsx b/components/input/Input.tsx index 05a04b25d1..06f590bbcf 100644 --- a/components/input/Input.tsx +++ b/components/input/Input.tsx @@ -140,6 +140,12 @@ export default class Input extends Component { renderLabledInput(children) { 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 addonClassName = `${wrapperClassName}-addon`; const addonBefore = props.addonBefore ? ( diff --git a/components/input/style/index.less b/components/input/style/index.less index 9545cb3369..31e9bafadc 100644 --- a/components/input/style/index.less +++ b/components/input/style/index.less @@ -8,10 +8,6 @@ .input; } -.@{ant-prefix}-input-wrapper { - display: inline-block; -} - //== Style for input-group: input with label, with button or dropdown... .@{ant-prefix}-input-group { .input-group(~"@{ant-prefix}-input");