Supply initial data with the page
Description
I have a server that can supply initial table data within first request but I don't understand what's the right approach to inject it into the table itself. TLDR I want to avoid separate request for table data and supply first page (initial state) within actual page request.
My first idea was to somehow intercept the first request and just swap in the data without actually performing the request but I don't understand how to actually make it.
Example(s)
https://wz2100-autohost.net/games
Sources: https://github.com/Warzone2100/wz2100-autohost.net/blob/master/layouts/games.gohtml#L32
Maybe the pipeline extension can help you.
Yes, looks like a very close thing but still I don't see a way to provide initial data when building a table.
You can also check out this extension: https://bootstrap-table.com/docs/extensions/defer-url/
Example: https://examples.bootstrap-table.com/#extensions/defer-url.html Source: https://examples.bootstrap-table.com/#extensions/defer-url.html#view-source
Wow, yes, that's almost exactly what I need, but could I supply JSON or JS variable? I don't enjoy writing a template that generates HTML rows server-side if bootstrap-table already does it why should I implement it twice...
I don't know why the second request should hurt that much, it's done in some ms. But it really want to skip that request you could use the defer-url extension to skip the request and then use the data option to load the data on the initial page load using JSON or a JS variable.
We will close this issue, as we got no response from you within the last month. Please let us know if you need further support.