I’m trying to trigger a Modal from a custom UI Macro. I started with my code as:
open()
{
const modal = new Modal(
{
resource: 'lean-coffee-resource',
onClose: (payload) => {
console.log('onClose called with', payload);
},
size: 'large'
});
modal.open();
}
Even when I “clean” up the code and remove the optional code:
open()
{
const modal = new Modal(
{
});
modal.open();
}
I can’t seem to get the modal open. I do get an error message with “Error: Unable to open modal.” but I have no clue why it’s not working…