229-multi-level-dropdown | animated multi-level dropdown | iOS library
kandi X-RAY | 229-multi-level-dropdown Summary
kandi X-RAY | 229-multi-level-dropdown Summary
Build an animated multi-level dropdown inspired by Facebook's UI
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a dropdown menu .
- Represents the app icon .
- Creates a new navigation item
- Creates a dropdown item .
- Layout for navigation .
- Calculates the height of an element .
229-multi-level-dropdown Key Features
229-multi-level-dropdown Examples and Code Snippets
Community Discussions
Trending Discussions on 229-multi-level-dropdown
QUESTION
Hello,
I am coming to you today for the first time because I have not found a solution to my problem.
I have been using react for a few weeks, Don't be too cruel about the quality of my code 😁.
Problem :
I am looking to access the state of a parent from their children.So I want to be able to access the setHeight function and the height variable for example from a child component.
Please note :
However, to keep some flexibility, I don't want to have any Components inside our.
I looked at redux to be able to do this, but the problem is that the data is global so creating multiple dropdowns would not be possible.
(Unless I didn't understand too much, redux is quite complex)
Diagram :
I have created a diagram to explain it a little better.,
I'd like the children of DropdownMenu to be able to access the state of the latter, Also, the different Dropdowns must have their own state independently.
So ideally I want to keep the same structure as find very flexible, and the possibility to create several dropdown.
Code :
I Share my four components :
ANSWER
Answered 2022-Mar-22 at 22:14I can say welcome to react in this moment and i glad for you
OK, i could understand what is your problem. but there isn't problem and this bug cause from your low experience.
As i understand you want to click on a dropdown and open it. and here we have nested dropdown.
I think it's your answer: You should declare a state on each dropdown and don't declare state in parent.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install 229-multi-level-dropdown
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