Our powerful JS Calendar component


Post by tdset »

We're using the Scheduler integrated into the calendar (as timeline mode) and there's this odd thing happening with the eventRecord not being updated based on the response received from the server.

  • my EventModel has 2 fields: FieldA and FieldB.
  • within the event editor, we change FieldA
  • we do the sync on save, and the server responds with both FieldA and FieldB (both changed)
  • since we only changed FieldA within the editor, FieldB keeps it's old value, even if the server responded with a new one

This scenario works well (no cache involved) if we're using "Day/Week/Month" modes, it only happens with the "Timeline" mode.

Is there any way to update the eventRecord fully based on the response received from the server, even if only a couple of fields changed?


Post by alex.l »

Hi tdset,

We need to see your code to help you with that, as well as JSON examples of server response.
If you find that record in eventStore, will that record has updated values?
try calendar.eventStore.getById(recordId).FieldB to see if it changed and the problem on rendering level only.
Did you specify FieldA and FieldB in eventStore's model?
How can we reproduce this problem?

Is there any way to update the eventRecord fully based on the response received from the server, even if only a couple of fields changed?

You can apply changes to record using set method with multiple fields object https://bryntum.com/docs/calendar/api/Scheduler/model/EventModel#function-set

All the best,
Alex


Post by tdset »

We do make use of set and the changes are pushed to the server.
I checked with the eventStore and the value of FieldB remains old in it too.

So both the eventStore and the eventRecord remain cached.

it works fine with the Day/Week/Month.

I understand you cannot help with a reproducible example, I will try to create one

thank you


Post Reply