Conversation
Merge branch 'allow-string-targets' into styling # Conflicts: # R/datatables.R
|
Now I think this feature is not suitable for DT as it becomes more complicated than I thought. I don't wanna introduce any complexity into DT as it's already a big project. Close it for now. |
|
It's was a very good try. Thanks. (Sob). Perhaps later ? :) |
Merge remote-tracking branch 'origin/main' into styling # Conflicts: # DESCRIPTION # NEWS.md # R/datatables.R # man/datatable.Rd # tests/testit/test-datatables.R
|
This reopened issue gives me the opportunity to thank you for your work on DT. When I first installed DT in early 2018, for me it was a simple adaptation of datatable.net, but now that I'm trying to use datatable.net with Flask Rest and VueJs 3 I see that I have to rewrite a lot of things which I thought was in datatable.net but actually written in the server side of DT, and I understand how your API wrapping initial datatable.net ones in the front side. |
|
|
Closes #938 #652 #990
DT implements many nice JS wrappers on styling the columns. However, R users may still find they want to implement their own style, as the love for beautiful table never ends. They can do it in two ways:
renderoptions, i.e.,datatable(..., options = list( columnDefs = list( list(targets = 1, render = JS(...)))))escapeargument toFALSE.Unfortunately, those two methods are either difficult to implement or contain side-effects:
columnDefs.renderoptionformattableThe new param
formatterallows users to write formatting functions in R without losing the ability to sort, filter or search by retaining the raw data "untouched" as it creates invisible helper columns.TODO
list(function() ... , targets = ...)Example