I have a Scheduler component on my page that uses a custom SchedulerEditItem to display the events. Every time I click on any Scheduler item that is not a allDay item, the allDay items get resized the height becomes 2 px bigger. In the screenshot you can see the allDay-Rows that are filled are bigger than the others. That's because I clicked multiple times on any scheduler items.
In the Scheduler component I have set the editable options like so:
editable={{ add: true, remove: false, drag: false, resize: false, select: false, edit: true, }}
Previously I also had the "select" option set to true and that caused the allDay items to resize even when I clicked anywhere in the scheduler, so also on the empty slots the same behavior was showing. It also doesn't help if I either set the slot height or the height in the styling of the SchedulerEditItems that have the isAllDay property set to true. Unfortunately my app is much to big to copy it somewhere to be able to troubleshoot the behavior. So I'll just put here the configuration of the Scheduler and the SchedulerEditItem to start the discussion.
<Scheduler
data={calendarData}
defaultDate={displayDate}
height={400}
header={(props) => <React.Fragment />}
footer={(props) => <React.Fragment />}
timezone="CET"
slot={CustomSlot}
onDataChange={handleDataChange}
editable={{
add: true,
remove: false,
drag: false,
resize: false,
select: false,
edit: true,
}}
editItem={CalendarProfileItem}
form={
isColumnEmpty
? NewProfileForm
: EditProfileForm
}
>
<WeekView
title="Full Week"
workWeekStart={Day.Monday}
workWeekEnd={Day.Friday}
showWorkHours={false}
workDayStart="06:00"
workDayEnd="19:00"
dateHeaderCell={CustomDateHeaderCell}
slotDivisions={1}
/>
</Scheduler>
<SchedulerEditItem
{...props}
ref={item}
title={title}
description={props.dataItem.description}
onDoubleClick={onSchedulerItemDoubleClick}
startTimezone={'CET'}
endTimezone={'CET'}
showOccurrenceDialog={false}
style={{
...props.style,
backgroundColor:
props.dataItem.color || GLOBALS.STANDARD_JOB_COLOR,
color: getContrastYIQ(
props.dataItem.color || GLOBALS.STANDARD_JOB_COLOR
),
height: props.dataItem.isAllDay ? '35px' : undefined,
}}
vertical={true}
>
</SchedulerEditItem>
Hello,
Thank you for the details.
I made an example using the provided code. After I click on the elements there is indeed an issue. Still, it may be different than the one you are describing:
https://stackblitz.com/edit/react-jktdxu?file=app/main.jsx
Could you please take a look at the example and advise if this is the same issue. If it is not, could you please update the example to showcase the issue you are observing and I will be happy to take a look at it.
Hi.
Ok, thanks for the example. Your behavior is similar but different. I have made an attempt to add as much code as needed to basically show the behavior I experience. I feared that I would have to upload my whole application but I didn't have to. What you'll see looks a little strange as there is some code missing but it is enough to show the behavior. Every time you will click on any of the events in the Friday column, the event on Saturday will grow by a couple of pixels:
https://stackblitz.com/edit/react-jktdxu-fsvgc1
I hope this is enough so you can check what is happening. Let me know if you need more information. By the way if you load it for the first time you might have to hit the reload button to sort the data... And also: Please note that I make use of this example code to position my calendar elements:
https://stackblitz.com/edit/react-yiyhmk-pbf7a3?file=app%2Fmain.jsx
So you can see how the application appears for me, I have added two screenshots that show how it looks before and after clicking on items. As you can see, after clicking, also the positioning of the non-all-day-items gets messed up and they are put to the full hour instead of staying where they should be.
Thanks!