Our pure JavaScript Scheduler component


Post by mirkor89 »

Hi Bryntum team,

I have this waring in console about features.
I saw it's a problem about the features inside the config.

        
features: { eventMenu: { disabled: true }, scheduleMenu: { disabled: true }, eventTooltip: { bodyCls: 'tooltip-body', template: data => ` <div class="flex flex-col space-y-1.5"> <div class="flex justify-between"> <span class="font-bold capitalize">${data.eventRecord.data.customer}</span> <span>${totalTimeSer} min</span> </div> ${services.map(service => ` <div class="flex justify-between gap-x-4 leading-none"> <span class="font-light w-full">${service.name}</span> <span class="font-semibold whitespace-nowrap w-full text-left"> ${new Date(service.startDate).toLocaleTimeString('it-IT', optionTime)} - ${new Date(service.endDate).toLocaleTimeString('it-IT', optionTime)} </span> </div> ` ).join('')} </div> ` }, scheduleTooltip: { generateTipContent({ date }) { return ` <span class="capitalize">${new Date(date).toLocaleTimeString('it-IT', optionDate)}</span> ` }, } }

Could I ask you how can I refactor the code to avoid the waring?

Attachments
Immagine 2022-05-18 113035.png
Immagine 2022-05-18 113035.png (9.83 KiB) Viewed 208 times

Thank you for your help,
Mirko


Post by tasnim »

In React we have a wrapper feature name in the docs.

Please study the guide here : https://bryntum.com/docs/scheduler/guide/Scheduler/integration/react/guide#features

Here every feature for scheduler-react is renamed by adding the suffix Feature after every feature name like:
for eventMenu it's called eventMenuFeature, for eventEdit it's eventEditFeature like so.

So to get rid of this waring. you just need to remove the features object and add the Feature suffix with the feature name like this:

eventMenuFeature : {...},
scheduleMenuFeature: {...},
eventTooltipFeature : {...}
.....

Best regards,
Tasnim


Post by mirkor89 »

Hi Tasnim,

Thank you so much. It's work!

Thank you for your help,
Mirko


Post Reply