Attempting to move a scheduler event when grouping by a resource with a remote data source produces the following console errors.
Uncaught TypeError: Cannot read property 'value' of undefined
Cannot read property 'groupIndex' of undefined
All events are unable to moved unless I double click an event and open it's edit menu first thing upon the scheduler data being bound and before taking any other action in the scheduler.
Both the scheduler data source and the resource data source are remote; however, when I hard-code the resource data source to match what the remote output would be, the scheduler works as intended.
Here's what my scheduler initialization code looks like.
$(function() {
var dataSource = new kendo.data.SchedulerDataSource({
transport: {
read: {
url: 'service url', /* omitted for example */
type: 'GET',
data: {
account_id: 'myAccountId'
},
dataType: "json",
beforeSend: function(req) {
req.setRequestHeader('example-api-key', '1234');
}
},
update: function(e) {
e.success();
}
},
schema: {
data: "schedulerEvents"
}
});
$("#scheduler").kendoScheduler({
date: new Date(),
toolbar: [ "search" ],
eventHeight: 50,
selectable: true,
views: [
"day", "week", "month", "agenda", {type:"timeline", selected: true}, "timelineWeek", "timelineMonth"
],
dataSource: dataSource,
group: {
resources: ["Assignees"],
orientation: "vertical"
},
resources: [
{
field: "assignees",
title: "Assignees",
name: "Assignees",
dataSource: {
transport: {
read: {
url: 'service url', /* omitted for example */
type: 'GET',
data: {
account_id: 'myAccountId'
},
dataType: "json",
beforeSend: function(req) {
req.setRequestHeader('example-api-key', '1234');
}
}
},
schema: {
data: "assignees"
}
},
multiple: true
}
]
});
});
The response data from the server looks like this:
{
assignees: [{ value: "1234", text: "Assignee Name" }],
schedulerEvents: [{ assignees: ["1234"], id: "9876", title: "Event Title", start: "2021-05-27T00:00:00", end: "2021-5-28T00:00:00" }]
}
You'll notice in my screenshot that the events appear to be grouped correctly, but nonetheless produce errors when clicking on them or trying to move them.
At a loss as to what may be causing this. Perhaps I'm missing something when it comes to binding remote data. Please let me know if there's anything I can do to solve this issue.