To implement a custom right-click menu on events in Scheduler Pro, you can use the EventMenu feature. You can customize the menu items by using the items config to add, modify, or remove items. Here's a basic example of how you can add a custom item:
const scheduler = new Scheduler({
features : {
eventMenu : {
items : {
customItem : {
text : 'Custom Action',
icon : 'b-fa b-fa-fw b-fa-flag',
onItem({ eventRecord }) {
// Your custom action here
console.log(`Custom action for ${eventRecord.name}`);
}
}
}
}
}
});
If you want to replace the entire menu with your custom component, you might need to handle the context menu event manually and render your component instead.
If you need more detailed guidance or code examples, please provide more information about your custom component and how you plan to integrate it.
If you want to replace the entire menu with your custom component, you might need to handle the context menu event manually and render your component instead.
StatusTraverse is a custom component that we have, and although I can get it to render, due to it having some ties to state management with Vuex and it being created dynamically, when the click action fires off on the component, there I run into some issues with Vuex being unrecognized (because a dynamically created component doesn't get state).
Is there a way to render a Vue component there without using createApp?
Can you try creating the custom Vue component and mounting it within App.vue, keeping it hidden by default. Then, when the event menu is triggered, you can control its visibility using a boolean flag.