Problems & questions using a Menu plugin in a subview

Hello, I'm having trouble using a Menu in a subview. My top view, "top.js", imports my class TopMenu from "top_menu.js". I've pasted both below.

My questions/problems:
1) When the views are rendered, clicking on the menu buttons does not seem to change the URL. (No error, just nothing happens.)
2) If I place "this.use(plugins.Menu, "menuLocalId");" within init() of top.js, I get an error, "TypeError: Cannot read property 'parent' of null". But I thought that's where it is supposed to go. If I place it within init() of top_menu.js, I get no error, but as noted above the menu just doesn't seem to work.
3) top_menu.js only works if I include that mysterious blank subview in the third row (see below). It doesn't even matter if it's $subview.false or $subview.true. But if I remove it, I get that same TypeError noted above.

Advice would be greatly appreciated!


import {JetView, plugins} from "webix-jet";
import {TopMenu} from "./top_menu.js"
export default class TopView extends JetView{
var userInterface = {
rows: [
{$subview:true, name:"topMenuSubview"},
{$subview: true, name: "floorplan"}]
return userInterface;
init() {"top_menu", {target:"topMenuSubview"}),"floorplan", { target: "floorplan" }),

import {JetView, plugins} from "webix-jet";
export default class TopMenu extends JetView{
config() {
return {
{type:"header", template:"Just a header"}
{view:"menu", id: "menuGlobalId", localId:"menuLocalId", name: "menuName",
{ id:"test_floorplan", value:"FloorplanButton" },
{ id:"data", value:"DataButton" }
{$subview:true}] //Why does this need to be here? I get TypeError without it.
this.use(plugins.Menu, "menuLocalId");

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!