CRUDE-ASP icon indicating copy to clipboard operation
CRUDE-ASP copied to clipboard

Utilize the xhr.dt event in DataTables to return additional metadata from server side call

Open EitanBlumin opened this issue 6 years ago • 0 comments

The xhr.dt event in DataTables allows intercepting the Ajax data returned from the server side call.

https://datatables.net/reference/event/xhr

This should let us use additional data returned by the server, such as dataview metadata:

  • [ ] Dataview metadata properties
  • [ ] Dataview actions (?)
  • [ ] Current active filters (#103)
  • [ ] Lists of available values for lookup field types (#111)
  • [ ] Debug and performance info (e.g. duration)
  • [ ] more TBD

Some metadata types shouldn't be returned on every draw, such as available values for lookup fields (or maybe we do need to return them every time because data might be changed), and dataview metadata, so for that purpose we could utilize the draw parameter and return this metadata only when draw=1.

EitanBlumin avatar Apr 10 '19 00:04 EitanBlumin