diff --git a/src/Mentions.tsx b/src/Mentions.tsx index a37596e..6683310 100644 --- a/src/Mentions.tsx +++ b/src/Mentions.tsx @@ -490,6 +490,7 @@ const Mentions = forwardRef( onChange, classNames: classes, className, + disabled, ...rest }, ref, @@ -520,6 +521,7 @@ const Mentions = forwardRef( handleReset={handleReset} className={className} classNames={classes} + disabled={disabled} > { rerender(createMentions({ ref, className: 'test-cls', suffix: '123' })); expect(container.firstChild).toHaveClass('test-cls'); }); + + it('disabled should work on affix wrapper', () => { + const { container } = render( + createMentions({ disabled: true, suffix: '1' }), + ); + expect(container.firstChild).toHaveClass('rc-mentions-disabled'); + }); });