-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 | disabled property as a function is not working with command prop #2365
Comments
This is expected behavior. Anchor link is disabled so click event do nothing. |
It’s not expected behavior according to your documentation:
That’s not at all an accurate description of the bug’s cause. The real problem lies on this line: primevue/src/components/menu/Menu.vue Line 88 in 6f48ac5
It does not check if primevue/src/components/menu/Menu.vue Line 195 in 6f48ac5
|
@tugcekucukoglu The In the example, @marlonrichert has set the disabled: () => false, meaning the Either the documentation should be fixed, or better, the code be fixed to handle the function case |
Menu
malfunctions when menu model property disabled
is a functionFixed #2365 - Menu | disabled property as a function is not working w…
Bug report
CodeSandbox Case
https://codesandbox.io/s/falling-cdn-8rlxcu?file=/src/MenuDemo.vue
Current behavior
In the menu model, if an object's
disabled
property is set to a function, then the correspondingMenu
item'scommand
no longer fires when clicked.Expected behavior
According to the menu model documentation,
disabled
is allowed to be a boolean or a function returning a boolean.Minimal reproduction of the problem with instructions
In the sandbox above, note that clicking Update does nothing, even though it has a valid
command
.What is the motivation / use case for changing the behavior?
The implementation should match the documentation.
Environment
The text was updated successfully, but these errors were encountered: