Coder Social home page Coder Social logo

229-multi-level-dropdown's People

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  avatar  avatar  avatar  avatar  avatar

229-multi-level-dropdown's Issues

Dropdown Bug

The forth menu item in the dropdown is always unclickable and unhoverable in the front icon face and it is available when mouse is hovered in the back or clicked. Please take a look into it.

Regards

Multiples Errors when using it with Typescript React

When using this code with typescript ans react i get the following errors:

  1. Property 'firstChild' does not exist on type 'never'.

  2. Type 'null' is not assignable to type 'string | number | (string & {}) | undefined'.

Can someone explain this line? `{open && props.children}`

Can anyone explain the {open && props.children} here? I am having trouble understand its positioning and effect. It is on line 45 of the App.js file for reference

function NavItem(props) {
  const [open, setOpen] = useState(false);

  return (
    <li className="nav-item">
      <a href="#" className="icon-button" onClick={() => setOpen(!open)}>
        {props.icon}
      </a>

      {open && props.children} // <- THIS CODE HERE
    </li>
  );
}

Thank you!

When click on the dropdown, a blank page opens?

Hi,
I have no idea what happened but when I click on the drop down button, a blank page appears for me. I have no idea why this happens. I haven't made any changes to the code. Please help

how to close a dropdown when launching another dropdown

Navbar includes multiple NavItems, they could include multiple dropdowns - it all works very well thank you. If I have one drop-down great. However, if I have a second drop-down menu it does not close the first when I open a new one which then appears underneath the first drop-down which is not the desired action. So it is both nonfunctional and looks bad.

An answer to this question could help people to work out how to resolve the other issue which could then be resolved with 'react-onclickoutside' maybe

Dropdown becomes less opaque when overlayed on other components

img1

the dropdown opacity increases when it is overlaying other components below the navbar and all its transitions and hover effect doesn't work .
it looks fine when it doesn't overlay the elements below but the hover effect and transition effects still doesn't work .

img2

everything still works when there are simple Html elements like h1 .

img3

Hope this Issue gets cleared soon

react-transition-group adding new classes instead of adding suffix

I'm not sure this is an issue, but when I try to code along with the tutorial on youtube. I ran into this problem.
Classes added to my element look like this: "menu-primary enter enter-active" instead of "menu-primary-enter-active".
So I have to change my css to this in order to make it works:

.menu-primary.enter {
  position: absolute;
  transform: translateX(-110%);
}

.menu-primary.enter.enter-active {
  transform: translateX(0%);
  transition: all var(--speed) ease;
}

.menu-primary.exit {
  position: absolute;
}

.menu-primary.exit.exit-active {
  transform: translateX(-110%);
  transition: all var(--speed) ease;
}

.menu-secondary.enter {
  transform: translateX(110%);
}

.menu-secondary.enter.enter-active {
  transform: translateX(0%);
  transition: all var(--speed) ease;
}

.menu-secondary.exit.exit-active {
  transform: translateX(110%);
  transition: all var(--speed) ease;
}

I have checked the version of react-transition-group and it is the same with this repo (4.3.0). Can anyone explain why this happened? Thank you

Multiple dropdown menus

This was an excellent tutorial, and I managed to get the drop down working, but I'm trying to get some ideas on how to have multiple drop downs on a single page. Currently if i open one dropdown all dropdowns on the page open up. I'm not sure if i need to go down the rabbit hole of setting state for which menu is open, or do i just created a separate DropDownMenu for each menu i need, or if i'm just missing some minor thing from the tutorial. Any leads would be appreciated.

Triggers top

when I click on dropdown its goes top of my page. I cant find solution can u help me?

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.