Support Forum
Please advise. Thanks.
BP
Please try this out:
features : {
eventContextMenu : {
// Extra items for all events
extraItems : [
{
text : 'Menu 1',
icon : 'b-fa b-fa-plane',
onItem : ({ eventRecord }) => console.log('Click on Menu 1', eventRecord),
menu : [{
text : 'Menu 2',
icon : 'b-fa b-fa-building',
onItem : ({ eventRecord }) => console.log('Click on Menu 1', eventRecord),
menu : [{
text : 'Menu 3',
icon : 'b-fa b-fa-cloud',
onItem : ({ eventRecord }) => console.log('Click on Menu 3', eventRecord)
}]
}]
}
]
}
},
Cheers,
Pavel
Pavlo Miklashevych
Sr. Frontend Developer
i am using scheduler pro calendar in salesforce, i have added submenu inside event menu,but it will triggered as i am expected. Please advise. Thanks.
JS code
eventMenu: {
// Extra items for all events
items: [{
text: 'Menu 1',
icon: 'b-fa b-fa-plane',
onItem: ({
eventRecord
}) => console.log('Click on Menu 1', eventRecord),
menu: [{
text: 'Menu 2',
icon: 'b-fa b-fa-building',
onItem: ({
eventRecord
}) => console.log('Click on Menu 1',
eventRecord),
menu: [{
text: 'Menu 3',
icon: 'b-fa b-fa-cloud',
onItem: ({
eventRecord
}) => console.log(
'Click on Menu 3',
eventRecord)
}]
}]
}],
editEvent: false,
deleteEvent: false
},
I have added a submenu to the event menu, it will display the menu button on the event right-click, but when I click on menu (Menu 1) submenu will not displayed. and I did not receive any error message into the console.
Event right click action buttons screen shot:
JS:
eventMenu: {
// Extra items for all events
items: [{
text: 'Menu 1',
icon: 'b-fa b-fa-plane',
onItem: ({
eventRecord
}) => console.log('Click on Menu 1', eventRecord),
menu: [{
text: 'Menu 2',
icon: 'b-fa b-fa-building',
onItem: ({
eventRecord
}) => console.log('Click on Menu 2',
eventRecord),
menu: [{
text: 'Menu 3',
icon: 'b-fa b-fa-cloud',
onItem: ({
eventRecord
}) => console.log(
'Click on Menu 3',
eventRecord)
}]
}]
}],
editEvent: false,
deleteEvent: false
},
Are you wraping this config to features
object? It should look like:
features : {
eventMenu : {
// Extra items for all events
items : [{
text : 'Menu 1',
icon : 'b-fa b-fa-plane',
onItem : ({
eventRecord
}) => console.log('Click on Menu 1', eventRecord),
menu : [{
text : 'Menu 2',
icon : 'b-fa b-fa-building',
onItem : ({
eventRecord
}) => console.log('Click on Menu 2',
eventRecord),
menu : [{
text : 'Menu 3',
icon : 'b-fa b-fa-cloud',
onItem : ({
eventRecord
}) => console.log(
'Click on Menu 3',
eventRecord)
}]
}]
}],
editEvent : false,
deleteEvent : false
}
},
}
I just checked this config and it works for me
I have tried wrapping it in features object, but still not displaying the submenu in event menu. I am looking forward to your quick response.
Here is the code snippet:
features: {
stripe: true,
eventMenu: true,
dependencies: true,
dependencyEdit: {
showLagField: false
},
timeRanges: true,
eventDrag: {
constrainDragToResource: false
},
eventMenu: {
// Extra items for all events
items: [{
text: 'Menu 1',
icon: 'b-fa b-fa-plane',
onItem: ({
eventRecord
}) => console.log('Click on Menu 1', eventRecord),
menu: [{
text: 'Menu 2',
icon: 'b-fa b-fa-building',
onItem: ({
eventRecord
}) => console.log('Click on Menu 2',
eventRecord),
menu: [{
text: 'Menu 3',
icon: 'b-fa b-fa-cloud',
onItem: ({
eventRecord
}) => console.log(
'Click on Menu 3',
eventRecord)
}]
}]
}],
editEvent: false,
deleteEvent: false
},
}
@Maxim Yes, I have removed one event menu on the feature object, but still I am facing same issue.
Code snippet:
features: {
stripe: true,
dependencies: true,
dependencyEdit: {
showLagField: false
},
timeRanges: true,
eventDrag: {
constrainDragToResource: false
},
eventMenu: {
// Extra items for all events
items: [{
text: 'Menu 1',
icon: 'b-fa b-fa-plane',
onItem: ({
eventRecord
}) => console.log('Click on Menu 1', eventRecord),
menu: [{
text: 'Menu 2',
icon: 'b-fa b-fa-building',
onItem: ({
eventRecord
}) => console.log('Click on Menu 2',
eventRecord),
menu: [{
text: 'Menu 3',
icon: 'b-fa b-fa-cloud',
onItem: ({
eventRecord
}) => console.log(
'Click on Menu 3',
eventRecord)
}]
}]
}],
editEvent: false,
deleteEvent: false
},
}
Which Bryntum Scheduler Pro version do you use? Which salesforce API do you use?
Can you try running our LWC component (one from the demo) with modified features config to see if it works?
If not, can you provide us your LWC component code so we can try it in our org? You can remove everything unrelated to scheduler instantiation. Also, where do you use your LWC component? Lightning app, community page or smth else?