Side drawer is not opening react-native-navigation V1 by wix
up vote
0
down vote
favorite
I have a login page. After successful login I am navigating to a page
where there is a sidedrawer.
So my Code is below:-
loginHandler(){
Promise.all([
Icon.getImageSource("menu",25,'red'),
Icon.getImageSource("question",25,'black')
]).then(source=>{
this.props.navigator.push({
screen: 'prabhuji.HomeScreen',
navigatorStyle: {},
navigatorButtons: {
leftButtons:[
{
icon:source[0],
title:"Menu",
id:"SideDrawerToggle"
}
],
rightButtons:[
{
icon:source[1],
title:"Help",
id:"Help"
}
]
},
drawer: {
left: {
screen: 'prabhuji.SideDrawer',
},
}
});
});
}
To open the sidedrawer I have the below code.
constructor(props){
super(props);
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);
}
onNavigatorEvent = event=>{
if(event.type==="NavBarButtonPress"){
if(event.id==="SideDrawerToggle"){
this.props.navigator.toggleDrawer({
side:"left",
});
}
if(event.id==="BackToHome"){
this.props.navigator.pop({
animated: true,
animationType: 'fade',
});
}
}
}
Can anyone please give me a solution what is wrong with this code?
My react native version is :- 0.55.0
react-native navigation version is:- "^1.1.486"
react-native wix-react-native-navigation
add a comment |
up vote
0
down vote
favorite
I have a login page. After successful login I am navigating to a page
where there is a sidedrawer.
So my Code is below:-
loginHandler(){
Promise.all([
Icon.getImageSource("menu",25,'red'),
Icon.getImageSource("question",25,'black')
]).then(source=>{
this.props.navigator.push({
screen: 'prabhuji.HomeScreen',
navigatorStyle: {},
navigatorButtons: {
leftButtons:[
{
icon:source[0],
title:"Menu",
id:"SideDrawerToggle"
}
],
rightButtons:[
{
icon:source[1],
title:"Help",
id:"Help"
}
]
},
drawer: {
left: {
screen: 'prabhuji.SideDrawer',
},
}
});
});
}
To open the sidedrawer I have the below code.
constructor(props){
super(props);
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);
}
onNavigatorEvent = event=>{
if(event.type==="NavBarButtonPress"){
if(event.id==="SideDrawerToggle"){
this.props.navigator.toggleDrawer({
side:"left",
});
}
if(event.id==="BackToHome"){
this.props.navigator.pop({
animated: true,
animationType: 'fade',
});
}
}
}
Can anyone please give me a solution what is wrong with this code?
My react native version is :- 0.55.0
react-native navigation version is:- "^1.1.486"
react-native wix-react-native-navigation
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a login page. After successful login I am navigating to a page
where there is a sidedrawer.
So my Code is below:-
loginHandler(){
Promise.all([
Icon.getImageSource("menu",25,'red'),
Icon.getImageSource("question",25,'black')
]).then(source=>{
this.props.navigator.push({
screen: 'prabhuji.HomeScreen',
navigatorStyle: {},
navigatorButtons: {
leftButtons:[
{
icon:source[0],
title:"Menu",
id:"SideDrawerToggle"
}
],
rightButtons:[
{
icon:source[1],
title:"Help",
id:"Help"
}
]
},
drawer: {
left: {
screen: 'prabhuji.SideDrawer',
},
}
});
});
}
To open the sidedrawer I have the below code.
constructor(props){
super(props);
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);
}
onNavigatorEvent = event=>{
if(event.type==="NavBarButtonPress"){
if(event.id==="SideDrawerToggle"){
this.props.navigator.toggleDrawer({
side:"left",
});
}
if(event.id==="BackToHome"){
this.props.navigator.pop({
animated: true,
animationType: 'fade',
});
}
}
}
Can anyone please give me a solution what is wrong with this code?
My react native version is :- 0.55.0
react-native navigation version is:- "^1.1.486"
react-native wix-react-native-navigation
I have a login page. After successful login I am navigating to a page
where there is a sidedrawer.
So my Code is below:-
loginHandler(){
Promise.all([
Icon.getImageSource("menu",25,'red'),
Icon.getImageSource("question",25,'black')
]).then(source=>{
this.props.navigator.push({
screen: 'prabhuji.HomeScreen',
navigatorStyle: {},
navigatorButtons: {
leftButtons:[
{
icon:source[0],
title:"Menu",
id:"SideDrawerToggle"
}
],
rightButtons:[
{
icon:source[1],
title:"Help",
id:"Help"
}
]
},
drawer: {
left: {
screen: 'prabhuji.SideDrawer',
},
}
});
});
}
To open the sidedrawer I have the below code.
constructor(props){
super(props);
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);
}
onNavigatorEvent = event=>{
if(event.type==="NavBarButtonPress"){
if(event.id==="SideDrawerToggle"){
this.props.navigator.toggleDrawer({
side:"left",
});
}
if(event.id==="BackToHome"){
this.props.navigator.pop({
animated: true,
animationType: 'fade',
});
}
}
}
Can anyone please give me a solution what is wrong with this code?
My react native version is :- 0.55.0
react-native navigation version is:- "^1.1.486"
react-native wix-react-native-navigation
react-native wix-react-native-navigation
asked Nov 8 at 10:34
Sandip Nag
113110
113110
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205933%2fside-drawer-is-not-opening-react-native-navigation-v1-by-wix%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown