From c0f99345a3151c65e5d3b361d6c5e5e5005c129b Mon Sep 17 00:00:00 2001 From: Felix Bernhard Date: Tue, 16 Jan 2024 12:20:44 +0100 Subject: [PATCH] Fixed #5038 - v2 Menu | disabled property as a function is not working with command prop (#5039) --- src/components/menu/Menu.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/menu/Menu.vue b/src/components/menu/Menu.vue index d00f2b2f5..910a77243 100755 --- a/src/components/menu/Menu.vue +++ b/src/components/menu/Menu.vue @@ -75,7 +75,7 @@ export default { methods: { itemClick(event) { const item = event.item; - if (item.disabled) { + if (this.disabled(item)) { return; } @@ -200,6 +200,9 @@ export default { visible(item) { return (typeof item.visible === 'function' ? item.visible() : item.visible !== false); }, + disabled(item) { + return (typeof item.disabled === 'function' ? item.disabled() : item.disabled); + }, label(item) { return (typeof item.label === 'function' ? item.label() : item.label); },