react-dd-menu | React Dropdown Menu | Menu library
kandi X-RAY | react-dd-menu Summary
kandi X-RAY | react-dd-menu Summary
React Dropdown Menu
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-dd-menu
react-dd-menu Key Features
react-dd-menu Examples and Code Snippets
Community Discussions
Trending Discussions on react-dd-menu
QUESTION
I realize there are 400 questions with the same title here, but for every one, the issue is that the onClick method was NOT a function. Mine is.
...ANSWER
Answered 2020-Feb-14 at 21:52The problem stems from this line: https://github.com/mlaursen/react-dd-menu/blob/master/src/js/NestedDropdownMenu.js#L45. It's intercepting all clicks and stopping propagation. Removing this line: https://github.com/mlaursen/react-dd-menu/blob/master/src/js/NestedDropdownMenu.js#L54, fixes the issue.
Working example:
That said, the react-dd-menu
package is extremely dated. I'd recommend looking for other alternatives (or developing your own drop menu!).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-dd-menu
close - a function to call that turns the isOpen boolean to false
toggle - any renderable item that will be used to toggle the menu open. So normally a button or any other content.
inverse - boolean if it is an inversed color menu
align - the alignment for the animation, text, and menu if the specific props are not given. Defaults to center
animAlign - the alignment/direction that the menu will appear from
textAlign - the alignment of each list item's text
menuAlign - the alignment of the menu to the toggle element
size - the size of the menu. Defaults to auto size.
className - any additional css classes to add the the dropdown menu container. (.dd-menu)
upwards - boolean if the menu should go upwards. Defaults to false
animate - boolean if the menu should animate on open and close. Defaults to true
enterTimeout - the amount of time in ms to end the CSSTransitionGroup. Defaults to 150
leaveTimeout - the amount of time in ms to end the CSSTransitionGroup. Defaults to 150
closeOnInsideClick - a boolean if the menu should close when you click inside the menu. Defaults to true
closeOnOutsideClick - a boolean if the menu should close when you click elsewhere on the page. Defaults to true
toggle - an renderable item that will open the nested menu on hover. It gets wrapped in a li element, so it might be best to have a button or a link tag.
nested - the nested menu's expansion direction. The default case should hopefully be the only used case. Inherit - If the main dropdown menu is aligned left, the nested menu will appear to the left as well. Reverse - If the main dropdown menu is aligned left, the nested menu will appear to the right. Left - Force the menu to appear to the left of the menu. Right - Force the menu to appear to the right of the menu.
animate - boolean if the nested menu should animate when appearing. Defaults to false
direction - The animation direction.
upwards - boolean if the nested menu should render upwards. Defaults to false
delay - A number in ms to allow the mouse to be off of the dropdown menu to close it. Defaults to 500ms
enterTimeout - the amount of time in ms to end the CSSTransitionGroup. Defaults to 150
leaveTimeout - the amount of time in ms to end the CSSTransitionGroup. Defaults to 150
openOnMouseover - boolean if the menu can be opened/close by mouseover/mouseleave events
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page