Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu prop expects array #60

Open
mglett opened this issue Feb 15, 2023 · 3 comments
Open

Menu prop expects array #60

mglett opened this issue Feb 15, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mglett
Copy link

mglett commented Feb 15, 2023

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!

@prabhuignoto prabhuignoto self-assigned this Feb 15, 2023
@prabhuignoto prabhuignoto added the bug Something isn't working label Feb 15, 2023
@prabhuignoto
Copy link
Owner

prabhuignoto commented Feb 15, 2023

@mglett do you have a codesandbox or any other alternative for reproducing this

@mglett
Copy link
Author

mglett commented Feb 15, 2023

@prabhuignoto
Sure!
Hope it's okay like that: codesandbox

@mglett
Copy link
Author

mglett commented Mar 6, 2023

Hey! Have you had time already to look into that? :)

Best Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants