Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Charon92 completely 100% unrelated to what our boy here is ranting about. Not that its bad advice. But he is mentioning Datatables.js for a reason.
-
Dude its a major pain in the ass to do any level of customization in that motherfucker. Speeeecially if you are dealing with populating data from an xml or json api.
By heavens that shit is absolute hell. Once you get it working its the tits tho. Will look for a React or Vue alternative. It just might be easier man. -
@AleCx04 it is not different though. The datatable has a default implementation difficult to change.
With css grid you can make your own implementation which is build from the ground up to do what you want.
Yes you can change an office building to live there but isnt it more comfortable to live in a house which has all your needs? -
achehab8436yI went through hell trying to configure it as well. Simple functionalities like single or multi row selection require sophisticated code to be written.
-
Subtixx356y@Codex404 That's the point of datatables. To not have to make your own. Datatables brings a lot of functionality, which is maybe their downfall but ultimately the best shit. If you can show me that I can make a fully working table with searching, reordering in CSS tables in 4 lines, then hell I'll believe you. But I guess that's not what css tables are about.
-
@Subtixx the point is that OP has to overwrite things because datatables is not what he needs. That costs ton of work. And can break things after an update. Building it yourself gives you full control.
If it is what you need then sure use it, but if its not then please write your own. -
nitnip18136y@Codex404 It's more extending than overriding. Well... basically it's just a million callbacks. There is some unexpected shit like having to download the language json files because browsers sometimes block the ajax request. And a lot of having to guess what's wrong since errors aren't always helpful.
The only parts I do override are the default export buttons.
Printable content is fine and all but it doesn't take into account the callbacks I made to customize the table so it's worthless as is. The pdf, csv and xls exports.... I'd rather do them in the backend. -
@Codex404 datatables is huge as it is man and building your own is akin to reinventing the wheel. The thing which makes it complex is that it takes a while to learn it. Its similar to learning a framework. But once you are done with it it can be all you need. Datatables is really huge.
Related Rants
JQuery DataTable is awesome when you just want to show a nice table without doing anything else.
As soon as you want to customize behavior it's hellish. My productivity slows to a crawl because of all unpredictable behavior and non-helpful errors.
Last one was something like $.f is undefined in console, all because I made a footer with a colspan bigger than the table.
Fuck this (Whatever 'this' is at the moment, probably undefined).
rant
js
datatables
jquery