Skip to content

Menu prop expects array #60

Open
Open
@mglett

Description

@mglett

Describe the bug
image
image

Tried a simple example as as described in README section "Populating Menu".
Got above warning.

To Reproduce
Steps to reproduce the behavior:

<script> import { DockMenu } from "vue-dock-menu"; import "vue-dock-menu/dist/vue-dock-menu.css"; export default { name: "anonMenuBar", components: { DockMenu }, data() { return { items: [ { name: "Login", }, ] } }, methods: { selected(item) { console.log("test", item) } } } </script>

Expected behavior
A clickable item without sub-menus.

Additional context
Everything works fine with the addition of an array menu prop.
items: [ { name: "Login", menu: [{name: "login"}], }, ]

A warning is also produced with the README documentation example:

{ name: "Edit", menu: { name: "edit-items", disable: true }, },

Thanks!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions