Merge pull request #2439 from tugcekucukoglu/menu
Fixed #2365 - Menu | disabled property as a function is not working w…pull/2443/head
commit
3e9e23944e
|
@ -85,7 +85,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
itemClick(event) {
|
itemClick(event) {
|
||||||
const item = event.item;
|
const item = event.item;
|
||||||
if (item.disabled) {
|
if (this.disabled(item)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +194,9 @@ export default {
|
||||||
visible(item) {
|
visible(item) {
|
||||||
return (typeof item.visible === 'function' ? item.visible() : item.visible !== false);
|
return (typeof item.visible === 'function' ? item.visible() : item.visible !== false);
|
||||||
},
|
},
|
||||||
|
disabled(item) {
|
||||||
|
return (typeof item.disabled === 'function' ? item.disabled() : item.disabled);
|
||||||
|
},
|
||||||
label(item) {
|
label(item) {
|
||||||
return (typeof item.label === 'function' ? item.label() : item.label);
|
return (typeof item.label === 'function' ? item.label() : item.label);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue