File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ const BaseInput: FC<BaseInputProps> = (props) => {
130130 if ( hasAddon ( props ) ) {
131131 const wrapperCls = `${ prefixCls } -group` ;
132132 const addonCls = `${ wrapperCls } -addon` ;
133+ const groupWrapperCls = `${ wrapperCls } -wrapper` ;
133134
134135 const mergedWrapperClassName = clsx (
135136 `${ prefixCls } -wrapper` ,
@@ -139,7 +140,10 @@ const BaseInput: FC<BaseInputProps> = (props) => {
139140 ) ;
140141
141142 const mergedGroupClassName = clsx (
142- `${ prefixCls } -group-wrapper` ,
143+ groupWrapperCls ,
144+ {
145+ [ `${ groupWrapperCls } -disabled` ] : disabled ,
146+ } ,
143147 classes ?. group ,
144148 classNames ?. groupWrapper ,
145149 ) ;
Original file line number Diff line number Diff line change @@ -226,4 +226,14 @@ describe('BaseInput', () => {
226226 ?. style . color ,
227227 ) . toBe ( 'blue' ) ;
228228 } ) ;
229+
230+ it ( 'with addon and disabled' , ( ) => {
231+ const { container } = render (
232+ < BaseInput prefixCls = "rc-input" addonBefore = "addon" disabled >
233+ < input />
234+ </ BaseInput > ,
235+ ) ;
236+
237+ expect ( container . firstChild ) . toHaveClass ( 'rc-input-group-wrapper-disabled' ) ;
238+ } ) ;
229239} ) ;
You can’t perform that action at this time.
0 commit comments