Hello,
I have a schedule component where a custom editor window opens on a single click of the cell or event. However, I think I've found a bug – I've noticed that when the scheduler is first rendered, OnEventClick doesn't trigger when an event is clicked. I've debugged with a cut down version of the scheduler (code copied below). Steps to reproduce:
@bind-CurrentView=@CurrentView
If you remove that attribute, OnEventClick triggers ok after the page is first loaded.
@using Syncfusion.Blazor.Popups
@page "/DebugClickEvent"
<SfSchedule TValue="AppointmentData" Width="100%" Height="650px" SelectedDate="@(new DateTime(2020, 1, 9))" @bind-CurrentView=@CurrentView>
<ScheduleEventSettings DataSource="@EventData" EnableTooltip="true"></ScheduleEventSettings>
<ScheduleEvents TValue="AppointmentData" OnCellClick="OnCellClick" OnEventClick="OnEventClick"></ScheduleEvents>
<ScheduleViews>
<ScheduleView Option="View.TimelineDay"></ScheduleView>
<ScheduleView Option="View.TimelineWeek"></ScheduleView>
<ScheduleView Option="View.TimelineWorkWeek"></ScheduleView>
<ScheduleView Option="View.TimelineMonth"></ScheduleView>
<ScheduleView Option="View.Agenda"></ScheduleView>
</ScheduleViews>
</SfSchedule>
<SfDialog @bind-Visible="DialogVisibility" IsModal="true" Width="575px" ShowCloseIcon="true">
<DialogTemplates>
<Header>
<div>Scheduled Event</div>
</Header>
<Content>
HI THERE!
</Content>
</DialogTemplates>
</SfDialog>
@code {
protected View CurrentView = View.TimelineWeek;
protected List<AppointmentData> EventData = DataList();
protected bool DialogVisibility { get; set; }
protected void OnEventClick(EventClickArgs<AppointmentData> args)
{
args.Cancel = true;
DialogVisibility = true;
}
protected void OnCellClick(CellClickEventArgs args)
{
args.Cancel = true;
DialogVisibility = true;
}
private static List<AppointmentData> DataList()
{
List<AppointmentData> eventDatas = new List<AppointmentData>
{
new AppointmentData { Id = 1, Subject = "Meeting", StartTime = new DateTime(2020, 1, 5, 10, 0, 0), EndTime = new DateTime(2020, 1, 5, 11, 0, 0), ProjectId = 1, RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=5;" },
new AppointmentData { Id = 2, Subject = "Project Discussion", StartTime = new DateTime(2020, 1, 6, 11, 30, 0), EndTime = new DateTime(2020, 1, 6, 13, 0, 0), ProjectId = 2 },
new AppointmentData { Id = 3, Subject = "Work Flow Analysis", StartTime = new DateTime(2020, 1, 7, 12, 0, 0), EndTime = new DateTime(2020, 1, 7, 13, 0, 0), ProjectId = 2, RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=3;" },
new AppointmentData { Id = 4, Subject = "Report", StartTime = new DateTime(2020, 1, 10, 11, 30, 0), EndTime = new DateTime(2020, 1, 10, 13, 0, 0), ProjectId = 2 }
};
return eventDatas;
}
public class AppointmentData
{
public int Id { get; set; }
public string Subject { get; set; }
public string Location { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public string Description { get; set; }
public bool IsAllDay { get; set; }
public string RecurrenceRule { get; set; }
public string RecurrenceException { get; set; }
public Nullable<int> RecurrenceID { get; set; }
public int ProjectId { get; set; }
}
public class ResourceData
{
public int Id { get; set; }
public string Text { get; set; }
public string Color { get; set; }
}
}
Hi Itadmin,
We have validated your reported issue at our end and confirmed this as a bug and logged the defect report "Event Click is not triggered in timeline views when tooltip is enabled" which can be tracked from the following link.
The fix for this defect will be included in our upcoming
weekly patch release which is expected to be rolled out by the end of August
2022. We would appreciate your valuable patience until then.
Regards,
Ruksar Moosa Sait
Hi Itadmin,
Thanks for being patience.
We are glad to announce that our weekly patch release 20.2.46 has been rolled out successfully. In this release, An issue with the EventClick not triggered in timeline views when the tooltip is enabled has been fixed. As a result, we recommend you upgrade to the latest version of our Syncfusion packages to avail of those changes.
Release notes: https://blazor.syncfusion.com/documentation/release-notes/20.2.46?type=all#scheduler
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Ravikumar Venkatesan