Our pure JavaScript Scheduler component


Post by JohnMousley »

Hi, I've just come across an issue which is causing the events to disappear on the scheduler.

in my code i'm trying to style the group headers, to do this i set the record.cls to a CSS class name in the renderer, this is fine when the data is initially loaded.
When performing a reload all events disappear, if I do not set the record.cls then everything works fine.

group: {
	field: 'type',
	ascending: true,
	renderer: ({ isFirstColumn, count, groupRowFor, record }) => {    
record.cls = 'groupHeader'; record.rowHeight = 30; return isFirstColumn ? `${groupRowFor} (${count})` : ''; } },

The CSS is quite simple, even if I remove all the CSS properties it still causes the events to dissapear:

.groupHeader {
    font-size: smaller;
    max-height: 30px;
    border-bottom: 3px solid black !important;
}

I have attached a sample project, you will have to scroll to Wed 05/05 at 10pm to see some events, when you click the reload button the events will disappear
.
This happens on the latest version 4.1.2 of Scheduler Pro

Thanks.

Attachments
ScheduleWS.zip
(14.15 KiB) Downloaded 48 times

Post by mats »

We'll check, but it's better to avoid writing to our classes during rendering. Try instead:

renderer: ({ isFirstColumn, count, groupRowFor, record, row }) => {    
row.addCls('groupHeader'); record.rowHeight = 30; return isFirstColumn ? `${groupRowFor} (${count})` : ''; }

Post by JohnMousley »

Hi, yes this has resolved the issue.


Post Reply