4 Answers, 1 is accepted
This happens because the DataSource's Model ID is not specified, which makes it impossible to distinguish new items from existing ones. As a result, all items are treated as new, hence they disappear on clicking the cancel button.
Specifying the ID field should solve the issue, as seen in this example.
I'm able to reproduce the issue using `scheduler.dataSource.add` instead of `scheduler.dataSource.data`. I had to change the logic of my script to:
// dataSource.add deletes event on edit -> cancel
var data = dataSource.data();
start: new Date(event.Start),
end: new Date(event.End),
Is it expected?
The reported behavior is expected when the add method is used. The Scheduler component treats the newly added events as temporary ones until they are synced. To achieve this, the datasource should be configured with its transport option and a "create" endpoint should be added.
Talking about the data method, it generally changes the dataSource of the component. This is why an event is not disappearing when added using this method.
Our thoughts here at Progress are with those affected by the outbreak.