This is in regards to my previous ticket #1426737. Your suggested solution did not work on closer look. The problem is that the event is turned off completely instead of only for a specific event.
Let me give you a practical example: I have a separate filter for the scheduler that allows me to look at the events for a specific resource. If someone else on a different computer now adds an event that is assigned to a different resource, it still shows up on my calendar. I want to suppress that event if it doesn't match the resource I selected in the filter. Using the taskHub.off('create') turns off the 'create' event completely (at least until the user refreshes the page). That way, new tasks added by someone for the selected resource won't show up.
I would like to subscribe to the events like this:
taskHub.client.update = onScheduleUpdate;
taskHub.client.create = onScheduleCreate;
And then in the function check if the filter applies to the task and if not, suppress it. I tried the 'preventDefault' method, but that also turns off the event completely.
functiononScheduleCreate(e) {
if(e.AssignedResource != filter.AssignedResource)
e.preventDefault(); -- does not work, turns off this event completely
}
This is not an untypical requirement for a calendar, especially if there are hundreds of tasks and filtering is the only option to organize them in a legible way.
There has to be a way to achieve this, but I have spent already way too much time on this. I need your help.
Thanks.