I am using WIX V2 navigation, I want to create a leftButton to toggle the sideMenu and make it visible when pressed, I am implementing my navigation stack as follows:
Navigation.setRoot({
root: {
sideMenu: {
left: {
component: {
name: 'app.Drawer',
enabled: false,
visible: false,
},
},
center: {
stack: {
children: [{
component: {
name: 'app.Screen',
},
}, ],
},
},
},
},
});
In my screen that has a toggle menu and I've created the options and events as follows:
import { Navigation } from "react-native-navigation";
export default class Screen extends Component {
constructor(props) {
super(props);
Navigation.events().bindComponent(this);
}
static get options(passProps) {
return {
topBar: {
title: {
text: 'Screen',
},
leftButtons: [
{
icon: require('../../../assets/icons/burgerIcon.png'),
id: 'toggleMenu',
},
],
},
};
}
navigationButtonPressed({ buttonId }) {
Navigation.mergeOptions('app.Drawer', {
sideMenu: {
left: {
visible: true,
},
},
});
}
I tried to follow the docs here but the event is not being captured by the event listener navigation button pressed event docs