Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributes 'suffix' and 'allowClear' of component 'Input' is sometime conflicted #18150

Closed
1 task
thisrabbit opened this issue Aug 7, 2019 · 2 comments · Fixed by #18151
Closed
1 task
Assignees

Comments

@thisrabbit
Copy link
Contributor

thisrabbit commented Aug 7, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Type something on both input component so that the clear icon can show up;

What is expected?

The position of clear button in the second input component will be exactly the same with the first input component.

What is actually happening?

The position of clear button in the second input component is wrong.

Environment Info
antd 3.21.2
React 16.8.6
System Windows 10
Browser Chrome 76

I actually want to create an input component with maximum input length hint, so I put the number in the suffix attribute, but it seems that the clear button only work correctly when the suffix is an icon. I also recommend you guys support the maximum length hint feature because it's useful when developer need to restrain the length user typed in!

@afc163
Copy link
Member

afc163 commented Aug 7, 2019

same as #17414

afc163 added a commit that referenced this issue Aug 7, 2019
@thisrabbit
Copy link
Contributor Author

Sorry for duplicate :)

zombieJ pushed a commit that referenced this issue Aug 8, 2019
* 🐛 Fix Input clear icon align problem

close #18150
close #17414

* Update index.less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants