-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add "order nulls last" global and per column options #279
Conversation
|
Any update on getting this merged? |
Will this be merged to the master branch any time soon? |
Well... I'd love to, but it seems it breaks tests for Rails prior to 5.x |
Ah! Bummer. |
…to order_nulls_last_new
It's failing the Oracle tests after merging in some fixes from the master branch. @n-rodriguez any ideas on what is causing Oracle to fail? It looks like its just a missing dependency or something. |
Yeah it's normal. Oracle tests depends on my own login and password to download the archive. |
spec/support/test_helpers.rb
Outdated
@@ -83,6 +83,9 @@ def get_raw_records | |||
end | |||
end | |||
|
|||
# class ComplexDatatableHash < ComplexDatatable | |||
# end | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can remove it? ;)
@@ -10,13 +10,17 @@ | |||
let(:column) { datatable.datatable.columns.first } | |||
|
|||
before do | |||
datatable.params[:columns] = {'0'=>{'data'=>'username', 'name'=>'', 'searchable'=>'true', 'orderable'=>'true', 'search'=>{'value'=>'searchvalue', 'regex'=>'false'}}} | |||
datatable.params[:columns] = {'0'=>{'data'=>'username', 'name'=>'', 'searchable'=>'true', 'orderable'=>'true', 'search'=>{'value'=>'searchvalue', 'regex'=>'false'}, 'nulls_last'=>'true'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we really need this since it shoud be set in the Datatable class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is being used. I think that is simulating setting it on the global variable. It's been a while since I've looked at this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing that fails the test…
Thank you! |
Awesome, Thank you guys for working on this and getting this merged. This will help me make my datatables more presentable. |
config.nulls_last = true
in theajax_datatables_rails.rb
file.nulls_last: true
to the view_columns method in the datatable class.