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

Dropdown component ignore its className prop #10325

Closed
1 task done
yenshih opened this issue May 2, 2018 · 4 comments
Closed
1 task done

Dropdown component ignore its className prop #10325

yenshih opened this issue May 2, 2018 · 4 comments

Comments

@yenshih
Copy link

yenshih commented May 2, 2018

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

Version

3.4.4

Environment

macOS Sierra 10.12.6, Chrome 65

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Open your console and find that trigger container with ant-dropdown-trigger class. It may have another class my-custom-dropdown.

What is expected?

className my-custom-dropdown should pass into trigger container span as a prop, intuitively.

What is actually happening?

className lost in trigger container somehow.


Related Code

className passed through Dropdown, RcDropdown and finally lost in RcTrigger.

@afc163
Copy link
Member

afc163 commented May 2, 2018

Try this way: https://codesandbox.io/s/72ormv6l76

@afc163 afc163 closed this as completed May 2, 2018
@yenshih
Copy link
Author

yenshih commented May 2, 2018

@afc163 Indeed, we have a component Groups. It works like:

<Groups className="container" childClassName="item">
    <Link>item1</Link>
    <Button>item2</Button>
    <Dropdown>{item3}</Dropdown>
</Groups>

The Groups will pass item as className for each child.
I just wanna to pass className into the container of Dropdown.
However, Dropdown ignore className.
IMO, this is not an intuitive behavior. It will confuse developers.
Shall we fix this problem?

@afc163
Copy link
Member

afc163 commented May 2, 2018

You can create a PR to rc-trigger for this.

@yenshih
Copy link
Author

yenshih commented May 2, 2018

@afc163 Sure, I'd be grad to do so. Thanks for your patience.

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

No branches or pull requests

2 participants