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

Pass custom className to clearable input #27444

Closed
1 task done
Parader opened this issue Oct 29, 2020 · 1 comment · Fixed by #27462
Closed
1 task done

Pass custom className to clearable input #27444

Parader opened this issue Oct 29, 2020 · 1 comment · Fixed by #27462
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug. 👷🏻‍♂️ Someone working on it

Comments

@Parader
Copy link

Parader commented Oct 29, 2020

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

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Inspecting the input element shows that it's missing the custom class passed to the component

What is expected?

Input component should be able to receive custom classNames when allowClear is set to true

What is actually happening?

Input component do not receive custom classNames when allowClear is set to true

Environment Info
antd 4.7.3
React 16.13.1
System Window 10
Browser Chrome

Changes introduced in this commit is what prevents custom className to be passed when allowClear is set to true

@afc163 afc163 self-assigned this Oct 29, 2020
@afc163 afc163 added the 🐛 Bug Ant Design Team had proved that this is a bug. label Oct 29, 2020
@Jarvis1010
Copy link
Contributor

I found this when looking in the code
Screen Shot 2020-10-29 at 2 19 40 PM
The className only gets applied if I pass a value into both addonBefore and addonAfter prop

afc163 added a commit that referenced this issue Oct 30, 2020
afc163 added a commit that referenced this issue Oct 30, 2020
* fix: Input[allowClear] className missing

close #27444

* fix snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. 👷🏻‍♂️ Someone working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants