Our powerful JS Calendar component


Post by tdset »

I use a custom editor in a setup similar to this one: https://www.bryntum.com/docs/calendar/#Calendar/guides/customization/replaceeventedit.md

Also I have a CrudManager configuration like the following:

{
    transport : {
        load : {
            url : '/my-events',
        },
        sync : {
            url : '/my-events',
        },
    },
    autoLoad : true,
    autoSync : true,
}

When saving an existing event, it works great: the sync is automatically executed (POST /my-events).

However when saving a new event (that has a $PhantomId), no synching happens (no ajax request is made).

Is it not enough to call

editingRecord.set({...})

when saving newly created events?

Thanks!


Post by mats »

Hard to say without seeing the full picture. Can you please upload a simple test case we can inspect / run?


Post by tdset »

For anyone else stumbling into this issue, the solution was to set

editingRecord.isCreating = false;

right after

// Update record
editingRecord.set({
    // redacted
});

Perhaps it's worth adding a note about this to the guide https://www.bryntum.com/docs/calendar/#Calendar/guides/customization/replaceeventedit.md


Post by mats »

We've added this to the docs, thanks! :)


Post Reply