The command option is not working on TieredMenu

pull/3502/head
mertsincan 2023-01-05 13:12:59 +00:00
parent 2268d6d7d5
commit 77c09018dc
1 changed files with 3 additions and 5 deletions

View File

@ -96,8 +96,8 @@ export default {
getItemKey(processedItem) {
return this.getItemId(processedItem);
},
getItemProp(processedItem, name) {
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
getItemProp(processedItem, name, params) {
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name], params) : undefined;
},
getItemLabel(processedItem) {
return this.getItemProp(processedItem, 'label');
@ -118,9 +118,7 @@ export default {
return ObjectUtils.isNotEmpty(processedItem.items);
},
onItemClick(event, processedItem) {
const command = this.getItemProp(processedItem, 'command');
command && command({ originalEvent: event, item: processedItem.item });
this.getItemProp(processedItem, 'command', { originalEvent: event, item: processedItem.item });
this.$emit('item-click', { originalEvent: event, processedItem, isFocus: true });
},
onItemMouseEnter(event, processedItem) {