Comments (13)
Nice plugin. Is there a way to trigger openMenu externally?
from react-native-side-menu.
Thanks for the warm words! I'm thinking about it now, but it doesn't seems to be an easy solution. You need to render menu first to get a reference to it's instance. Since you have a ref, you can call openMenu
. I'll try to make an example for that tomorrow.
from react-native-side-menu.
Yes this.refs.{menuid}.openMenu() works fine. thanks
A toggleMenu function is useful for open/close the menu from an external button
toggleMenu:function () {
if (this.left) {
this.closeMenu();
} else {
this.openMenu();
}
},
from react-native-side-menu.
@Kureev Can you put up a small example for this? I need to trigger openMenu externally.
Not sure how to handle the ref thing.
from react-native-side-menu.
Sure, I'll try to make an example asap, but I need some time to figure out about #4
from react-native-side-menu.
Thanks. I would need #4 to be solved anyways. I will also look into the codebase in some time.
from react-native-side-menu.
@chirag04 landed in this thread to look for info for triggering the openMenu from a button. Not sure if this is what you want, but just in case here is a gist: https://gist.github.com/swennemans/fdaa321fcc02db96de96
Now, lets see how to transition to the next route with navigatorIOS 👍
from react-native-side-menu.
@swennemans Awesome thanks. I would prefer an api exposed by the component itself for this though.
from react-native-side-menu.
@chirag04 @adrian-social-prod open
method has been exposed in 0.3.0
(thanks to @dvcrn)
from react-native-side-menu.
property to open menu from the right side will be super usefull
from react-native-side-menu.
@liubko you mean API to toggle menu? It's already implemented. See #15
from react-native-side-menu.
- @Kureev no, I mean: ability to position drawer at the right side of the screen
- what do you think about adding dragElement like here: http://jakiestfu.github.io/Snap.js/demo/apps/dragElement.html
because currently SideMenu's responder handles all drag events on the screen, and it breaks my apps functionality.
from react-native-side-menu.
@liubko Ah, I see:
-
Yes, it's in the roadmap. Unfortunately, I'm busy last month to implement something new, but in theory nothing hard.
-
I think it's a really great idea. I think instead of creating additional layer we can add prop with ref to handler:
<SideMenu handler={'handler'} menu={<Menu/>}> <ListView ref='handler' source={source} /> </SideMenu>
from react-native-side-menu.
Related Issues (20)
- OpenMenuOffset not working in production.
- Where did the Menu tags come from? HOT 2
- Hardware Back closes App on every scene in side menu
- Sample code does not work HOT 1
- Shadow/Elevation possibility feature request HOT 1
- undefined is not a function (near '..._react2.default.createClass...') Why am i getting this error ?
- TypeError Undefined is not a function (evaluating _firebase.default.initialize app) HOT 1
- SideMenu is visible below the component it is rendered on HOT 6
- 1 to 2 second delay when toggling menu HOT 3
- Crash on iOS when app built in release, works in debug HOT 3
- Is react-native-web supported? HOT 2
- All API props are not available in v1.1.3
- autoClosing prop does not work
- Use native driver for the animation HOT 4
- Side Menu stuck on android device, i can not click any where. it always appear at the left side of the screen and ovellaping the main screen content HOT 1
- Change style overlay
- componentWillMount has been renamed, and is not recommended for use HOT 1
- align problem when phone language is Arabic HOT 3
- Can we get a new release please? HOT 15
- Warnings HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-side-menu.