Fixed #2365 - Menu | disabled property as a function is not working with command prop

pull/2439/head
Tuğçe Küçükoğlu 2022-04-11 15:20:15 +03:00
parent 397cbff2aa
commit e4ce372d67
1 changed files with 4 additions and 1 deletions

View File

@ -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);
},