nodegui/react-nodegui

Problems rendering MenuBar with Actions

amgdev9 opened this issue ยท 1 comments

Describe the bug
I've been struggling in trying to make a menu bar, actions do not appear under each menu.

To Reproduce

The component below holds the menu I'm trying to render:

import React from "react";
import { MenuBar, Menu, Action, Text } from "@nodegui/react-nodegui";

class AppMenu extends React.Component {
    render() {

        return (
            <MenuBar>
                <Menu title="&amp;File">
                    <Action text="New project" />
                    <Action text="Open project" />
                </Menu>
            </MenuBar>
        );
    }
}

export default AppMenu;

Here is the main app component:

class App extends React.Component {
    render() {
        return (
            <Window
                windowTitle="SampleApp"
                minSize={minSize}
                styleSheet={styleSheet}
            >
                <AppMenu />
                <View style={containerStyle}>
                    <Text id="welcome-text">Welcome to NodeGui ๐Ÿ•</Text>
                    <Text id="step-1">1. Play around</Text>
                    <Text id="step-2">2. Debug</Text>
                </View>
            </Window>
        );
    }
}

Expected behavior
It's suppossed to render the menu with the specified actions. Menus show fine but not actions. When I click a menu, nothing shows up.

Desktop (please complete the following information):

  • OS: Ubuntu
  • NodeGUI version: 0.29.0
  • React NodeGUI version: 0.9.0
  • OS Version: 18.04

Nvm, I had to just set the "on" property with some events.