Our powerful JS Calendar component


Post by jack123abc »

I tried to display the event name with multi-lines, is there any easy way to do it? I tried to use html format, but as follows:

multi-lines.png
multi-lines.png (52.57 KiB) Viewed 807 times

Post by jack123abc »

I tried htmlstring.decode() or eventrenderer, maybe put it in wrong place, it still show with one line.


Post by mats »

Can you please post the code you tried?


Post by jack123abc »

current code:

  1. event store data method:
    const eventStoreItems = pmgsInfoList.map(pmgsInfo => {
    
        return {
            id: pmgsInfo.Id,
            name: `<div><p>PMGS-000001<br/>Daily<br/>Summary Of all Transformer Assets</p></div>`,
            resourceId: 1,
            ...
        }
    })
  1. invoking prepared event store data method

    this.pmgsList = calendarEvents(this, data.pmgsList);
  2. using this data on calendar initial method

    this.calendarInstance = new bryntum.calendar.Calendar({
    
        listeners: calendarListeners(this),
        appendTo : this.template.querySelector('.calendar'),
    
       ...
        eventStore : {
            data : this.pmgsList
        },
        ...
        

Post by jack123abc »

just want to display the event name with multi-lines, any suggestion?


Post by alex.l »

Not supported and not easy to achieve right now. I've created a feature request here: https://github.com/bryntum/support/issues/3435
It contains some details about how it may be done, but I cannot provide you a fast workaround here.

All the best,
Alex


Post by jack123abc »

thanks, Alex, when can this feature be published? or there is a plan to this feature request release? thanks for your support.


Post by alex.l »

Unfortunately, I cannot provide any terms right now. Subscribe on ticket updates, you will be notified when it got a milestone and resolved after.

All the best,
Alex


Post Reply