From e4ce372d671dfaf7ee76a05726e26fdc09e0d488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 11 Apr 2022 15:20:15 +0300 Subject: [PATCH] Fixed #2365 - Menu | disabled property as a function is not working with command prop --- 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 6d6c2744c..26431fb8c 100755 --- a/src/components/menu/Menu.vue +++ b/src/components/menu/Menu.vue @@ -85,7 +85,7 @@ export default { methods: { itemClick(event) { const item = event.item; - if (item.disabled) { + if (this.disabled(item)) { return; } @@ -194,6 +194,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); },