We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
disabled
I have a requirement that selected MenuItems should appear disabled. I tried this:
<MenuItem key={id} disabled={ id === this.state.selectedId } > {menuItemName} </MenuItem>
This causes issues on this line: https://github.com/react-component/menu/blob/master/lib/Menu.js#L155
since this code causes onDeselect not to be defined: https://github.com/react-component/menu/blob/master/lib/Menu.js#L218-L221
I've disabled the disabled check and it seems to fix my menu. Is this premature return necessary?
return
The text was updated successfully, but these errors were encountered:
6204eb7
it's an interesting use case: you can not deselect a selected disabled menuitem
http://react-component.github.io/menu/build/examples/multiple.html
Sorry, something went wrong.
Thanks for the fix! Curious, why the concat([]) call here?: 6204eb7#diff-5fbb3e2b7b0ae90b101ff557be1ad728R186
concat([])
Are you cloning the this.state.selectedKeys to prevent referencing the original state object?
this.state.selectedKeys
yes, modify state/props directly is a bad practice (as react 0.13 emphasized), i didn't notice it before.
css modules react-component#5
b5d7932
No branches or pull requests
I have a requirement that selected MenuItems should appear disabled. I tried this:
This causes issues on this line: https://github.com/react-component/menu/blob/master/lib/Menu.js#L155
since this code causes onDeselect not to be defined: https://github.com/react-component/menu/blob/master/lib/Menu.js#L218-L221
I've disabled the
disabled
check and it seems to fix my menu. Is this prematurereturn
necessary?The text was updated successfully, but these errors were encountered: