-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
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
Can't create dropdown button in navbar #1042
Comments
Are you using a package for the dropdown menu functionality?
|
@sheparddw thanks for the reply :) , i already solved the problem, but from what you said i believe that i was doing this in the wrong way. |
After wrapping the |
@flaviotobi may I know how you solved this issue? I have exactly same problem where dropdown cuts off beyond navbar (android only, works fine in iOS). I am using just |
@vinayr Yes, no problem. 1- So i render the right button in navBar as the docs says to do it ( renderRightButton={yourFunction()} ). 2- Than i created a component as you usually create, and i call them in every view that i want the menu (don't forget to give the menu component position absolute or zIndex depending in what you desire ). 3-in menu component i have a prop.showMenu that if true the menu Height is 560( this value can be anything you want) and if false the menu Height is 0. 4- ok now the only thing that you need to do is to communicate between the button in nav bar and the menu component, in a way that when you click the button it opens/close the menu. this is line of communication: So from navBar i refresh the view and pass the prop showMenu to that view as a prop, and in the view i pass again the prop showMenu that i received from the refresh to menu component as a prop, and than you open or close the menu. This response is bad but i don't have much time to explain in a better way, later tonight i'm gonna try to edit and explain it better. In the meantime try to see if you understand what i did from what i said above. If in the meantime you have any question please post here, so later tonight i can respond. |
@flaviotobi Thanks for your response. I am not using any external modules for dropdown, just built-in |
@vinayr Hi, sorry for not reply any sooner, but unfortunately i didn't had the time. |
@flaviotobi yes I resolved it #1152 (comment). Thanks for your inputs though. |
@flaviotobi Would you provide some example code of your menu dropdown? I have been trying to get this menu dropdown to work for a week now and I haven't been able to figure out how to display the dropdown or connect the redux actions to the nav button or the dropdown. I know it's been some time since you posted but hopefully it would help out :) |
@wkwyatt have you tried @sheparddw and @edy solution? |
@flaviotobi I haven't, I didn't think to see if it was compatible with RNRF. I guess the only way to know for sure is to try it |
can you just share the code for the same (I am new to RNRF) |
Hi, i'm trying to create a dropdown button on the navBar, to do this i pass a function to the prop renderRightButton to create a button that when pressed will show a list of elements.
In iOS it works perfectly and as expected but in android doesn't work.
Version
-Mac OS
Expected behaviour (prints from iOS. Tested in Emulator iPhone 6, real device iPhone 6s)
Actual behaviour (Prints from Android. Tested in Samsung Galaxy S4 mini)
Steps to reproduce
The text was updated successfully, but these errors were encountered: