- Home
- Forum
- React - EJ 2
- DataManager / UrlAdaptor always re-requests all of the data after SaveEvent?
DataManager / UrlAdaptor always re-requests all of the data after SaveEvent?
After we save an event, via the dialog or drag-drop the Scheduler always calls our get-appointments endpoint and requests all of the data again, event though we reloaded the event during Save and returned it back on the response. Everything is working fine, but there is a very noticeable lag and makes this appear unprofessional due to that.
We are confounded as to why this is?
Our get looks like this:
[HttpPost("get-appointments")]
public async Task<ActionResult<List<vwAppointment>>>
GetAppointments([FromBody] AppointmentParamsDto request)
{
// returns appointments, saves just fine
}
our save looks like this
[HttpPost("update-appointments")]
public async Task<ActionResult<vwAppointment>>
UpdateAppointments([FromBody] AppointmentSaveRequestDto request)
{
// saves just fine, reloads the entity from the database, and returns it just fine
}Still the scheduler requests all of the data, I've commented nearly every single thing out in the Scheduler until it's bare bones and it still calls "get-appointments" after Save? What does the Scheduler want me to return in the Update in order for it not to request the entire scheduler's worth of data again?
Follow up question, how can we get rid of the noticeable lag upon save, we have to hit the server, save it, and re-request it (other fields get update upon save).
It's really noticeable only upon onDragDrop(), you see a noticeable delay and flash as the appointment repaints where it used to be and then in it's new position. It would be great if it could simply repaint based on where I "let it drop" before the data is returned and then when the async data comes back (later) just update the data internally.
- 3 Replies
- 2 Participants
-
MG Mike Griffin
- Dec 11, 2024 05:45 PM UTC
- Jan 2, 2025 09:49 AM UTC