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 trigger generate warning #676

Closed
ghost opened this issue Oct 13, 2016 · 3 comments
Closed

Dropdown trigger generate warning #676

ghost opened this issue Oct 13, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2016

render() {
    const TRIGGER = (
        <div className="user-info">
          <div className="round-icon">
            <i className="fa fa-user"></i>
          </div>
          <div className="user-name">
            <span>Hi {this.props.user.getFullName()}</span>
          </div>
        </div>
    );

    return (
        <Dropdown trigger={TRIGGER} pointing="top left" icon={null}>
          <Dropdown.Menu>
            <Dropdown.Item text="Profile" />
            <Dropdown.Item text="Log out" />
          </Dropdown.Menu>
        </Dropdown>
    );
  }

generate next warning

warning.js:36 Warning: Failed prop type: `children` prop in `Dropdown` requires props: `text`.
    in Dropdown (created by UserInfo)
    in UserInfo (created by Connect(UserInfo))
    in Connect(UserInfo) (created by AppHeader)
    in div (created by AppHeader)
    in div (created by AppHeader)
    in AppHeader (created by Connect(AppHeader))
    in Connect(AppHeader) (created by App)
    in div (created by App)
    in App (created by Connect(App))
    in Connect(App) (created by RouterContext)
    in RouterContext (created by Router)
    in Router
    in Provider

any suggestions how to fix this?

@jeffcarbs
Copy link
Member

@SergeyShablenko - there's some work in progress to refactor the dropdown component #672. That PR will also address these proptype warnings so we'll leave this open until that's merged.

@levithomason
Copy link
Member

levithomason commented Oct 14, 2016

This warning is also fixed in #645 (Dropdown.js). Once merged, it will go away.

@levithomason
Copy link
Member

@SergeyShablenko this is now fixed in [email protected], cheers!

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

No branches or pull requests

2 participants