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

[DropDownMenu] not sending menu item value #5708

Closed
yanickrochon opened this issue Dec 2, 2016 · 0 comments
Closed

[DropDownMenu] not sending menu item value #5708

yanickrochon opened this issue Dec 2, 2016 · 0 comments
Labels
component: menu This is the name of the generic UI component, not the React module!

Comments

@yanickrochon
Copy link

I need to generate a DropDownMenu dynamically, and some of the options (menu items) are grouped with a Divider and a Subheader. Kinda like

<DropDownMenu value={ current } onChange={ this.handleChange }>
  { groups.map(group => (
    <div key={ group.name }>
      <Divider />
      <Subheader>{ group.name }</Subheader>
      { group.options.map(option => (
        <MenuItem key={ option.key } value={ option.value } primaryText={ option.label } />
      )) }
    </div>
  )) }
</DropDownMenu>

Unfortunately, the handleChange handler only receives two arguments; the event object and an index. The value is always undefined, even if manually specified (i.e. therefore, it is not that option.value = "undefined";). I suspect it may have something to do with the <div> element in there; I'd have to actually read the code 😛

In any case, this is an issue.

@oliviertassinari oliviertassinari changed the title DropDown Menu not sending menu item value [DropDownMenu] not sending menu item value Dec 18, 2016
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 21, 2022
@zannager zannager added component: menu This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants