Code Monkey home page Code Monkey logo

react-dd-menu's People

Contributors

jeremybut avatar jmancherje avatar jtadmor avatar mbroadst avatar mlaursen avatar mpobrien avatar richardwillars avatar williamboman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-dd-menu's Issues

Align property does not work

I can't get the align property (other than center) to function. Using either right or left option is always left aligned.

Also tested with the Options example and the issue is present there too.

Add a Delay to NestedDropdownMenu blur/leave

Need to add some sort of delay so that the nested dropdown menu doesn't close instantly if the user accidentally moves the mouse outside of the menus. A good default is 500ms.

Add Pretty Separator

Need to have a utility class that creates a separator in the dropdown menu. Needs to be for regular and inverse

idea would just be <li role="separator" className="separator" />

Menu is closed before menu item click is handled

I must be doing something wrong. If I have the close handler set correctly to set the state of isMenuOpen to false, then the handler registered on the a tag in the menu is never called. If I either don't set the close handler at all (which raises a React error, and breaks functionality) or if I put the setState in a setTimeout, it works as expected.

What am I doing wrong?

How to deal with dropdown being hidden

I want to add a menu to a fixed header. The header CSS is basically:

position: fixed;
top: 0;
left: 0;
height: 60px;
width: 100%;
z-index: 2;

If I try to add a <DropdownMenu> to an element in the header, most of the menu itself will be hidden because obviously the parent element is only 60px tall.

Is there some mechanism in react-dd-menu or some workaround to get around this?

controlling left\right icon

Hello,
For some reason when i have a nested menu, the arrow points in the wrong direction. where is this handled in code so i can take a look at whats going wrong?
thanks
image

Handle Multiple Nested Menus Closing at the Same TIme (Animated Only)

If there are multiple nested dropdown menus open, and the entire menu is closed (either moving the mouse off the menu, clicking somewhere on the screen, or the toggle) There is an error "Unable to access componentDidLeave on null component". This happens with the ReactCSSTransitionGroup.

Solution: Either figure out how to close menus in order from farthest nested up, possibly disable transition for closing, or find some other solution.

This actually causes no problem wioth the menu, would just be nice to eliminate any console error messages..

DD menu is going off screen

Leaving width auto, opening to the left, the DD menu content is going outside of the screen on mobile views. Is there an option to make it stop at the screen limit?

Open menu at the click location

Is there a way to display the menu when I click on the trigger, but have the top-left (or other) corner of the menu at the (x,y) position of the click?

onClick event not triggered

Hi,

I try to use an onClick event for the menu items in my menu, but none of these events ever get fired (console.log('You clicked an item');)

I tried the exact same code from the example at https://github.com/mlaursen/react-dd-menu but without luck. Any idea why these events are not triggered? Thanks in advance!

Replace PureRenderMixin with PureComponent

Hi, thanks for creating this component!

The only thing I dislike is that it requires me to add an extra dependency to my package.json: react-addons-pure-render-mixin. Also, the React team are now discouraging this in favor of React.PureComponent:

The PureRenderMixin mixin predates React.PureComponent. This reference doc is provided for legacy purposes, and you should consider using React.PureComponent instead.

https://facebook.github.io/react/docs/pure-render-mixin.html

I'd be happy to make a pull request, but PureComponent was only introduced this July in 15.3.0, and so it would cause problems for anyone who hasn't updated React since July, so I guess it would also require a version bump. I was wondering if/how you would like to handle this?

Allow Nested Dropdown Menus

Should probably allow dropdown menus to be nested.So when you hover over a list item that has a nested dropdown, the other dropdown appears. Maybe no animation. Who knows.

Invoke `props.close` on unmount

Would it make sense to invoke props.close in componentWillUnmount? Currently I render x amount of dropdowns in a component. These dropdowns' open/closed state are kept in global state. These dropdowns can also be arbitrarily removed in real-time via websocket events. When they are removed when they are open, it'll keep its global state as open. By having DropdownMenu invoke props.close in unmount I can "circumvent" this.

I can work around this by creating a wrapper component for DropdownMenu that handles this, but was wondering if you thought it'd be a good idea to keep it in this component?

Checkbox Functionality?

Hi, are there any plans to implement check-box functionality on menu items? This is a feature of react-tree-menu, as demonstrated on this demo page. I only ask because the CSS on this library is more attractive and the visibility-toggling of sub-menus looks very clean -- I'd love to use this project, but my goal is to use the nested menus as filters rather than simply navigation.

Fix Exports for ES5 People.

If working in ES% and you try to
require('react-dd-menu'),
you don't get the DropdownMenu. You have to specify
require('react-dd-menu').default.

Update to react 15

Hi,

We are looking to upgrade to react 15, but this library doesn't like that as a peer dependency. Any objections to a pull request making that change?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.