« first day (4797 days earlier)      last day (279 days later) » 

10:46 AM
Greetings. I don't suppose anyone knows off the top of their head a good example of pagination for dataTables backed by a python backend? There's a really old thread and then something about pipelining but I'm struggling to pull it together
@roganjosh Client-side or server-side pagination?
For client-side datatables should probably work well. I occasionally throw it as a userscript on websites that have tabular data and I want to sort or something. Easy to set up - if you have the data already, then add the library and initialise it with the table you want.
Kinda both I guess. I feel like the pipelining article goes whole-hog when I barely understand the basic mechanism for it triggering a request for more data.
For server-side...not sure. IIRC DataTables could also work with server-side pagination but probably needs to be tailored a lot more to it.
lol, didn't see the article is about DataTables :D
Ugh, lookint at that pipelining example they have it seems like you have to implement cache by yourself in JS. It seems to try and reduce the calls to the server by caching the requests and conditionally drawing the data from the cache instead of making an AJAX call.
The server-side processing example they have is awful. You can flip to the PHP code to try and see what they do with the request so you figure out what the request is. But they just pass the entire request data to some method SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) which explains nothing about how the request is made and what to expect.
11:05 AM
I'm glad you're saying this because I was starting to feel quite stupid. Before I care about pipelining or anything, I just need to see a basic callback function on the "next" button for the table, and then build up from there. I can't for the life of me seem to find something documenting this
Yeah, the documentation seems to skip mentioning what you need to do. Just how to set it up to work with a backend. But not how that is supposed to be handled.
I'm with you, I wouldn't worry about that "pipelining". You can even handle it at a different level - like some gateway that tries to cache responses. I'm also digging to figure out how that works with server-side. Technically, shouldn't be hard. It would probably send something like server.com?order_by=col7&order=asc&page=1&items_per_page=50 and you take those and return the appropriate data. The exact shape of the request is missing, though.
Exactly, the request should be absolutely minimal to at least get a basic pagination setup going. Thank you for looking into it :)
@roganjosh A-ha! it's documented...elsewhere entirely? datatables.net/manual/server-side this lists the parameters sent and what it expects back. You can then also use the ajax parameter as a function to further process the returned data. If needed, like maybe re-shape it to fit the expected result. But I think the first article is what you need to get started.
And pipelining, again, I wouldn't worry about at the moment. I'd even consider not handling that in DataTables.
Omg, lifesaver. Thank you!
 
9 hours later…
7:46 PM
 
1 hour later…
9:09 PM
!!choose blight or wandering
wandering
9:44 PM
!!choose wandering or wandering
wandering
I'm surprised, I thought james would pick "wandering"
9:56 PM
posted on December 04, 2023 by Ben Mason

The Beta channel has been updated to 120.0.6099.62 for Windows, Mac and Linux. A partial list of changes is available in the Git log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues. Srinivas Sista Google Chrome


« first day (4797 days earlier)      last day (279 days later) »