From 7204e47ba5fb6c0322ab020914c0abb63384525e Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 16 Jul 2021 10:49:41 +0200 Subject: [PATCH] Fix sorting by role with filtering in team members table [SCI-5908] --- app/datatables/custom_datatable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/datatables/custom_datatable.rb b/app/datatables/custom_datatable.rb index 0b60d9e12..033bb49b8 100644 --- a/app/datatables/custom_datatable.rb +++ b/app/datatables/custom_datatable.rb @@ -18,8 +18,8 @@ class CustomDatatable < AjaxDatatablesRails::Base def fetch_records records = get_raw_records - records = sort_records(records) if order_params.present? records = filter_records(records) if dt_params[:search].present? + records = sort_records(records) if order_params.present? records = paginate_records(records) unless dt_params[:length].present? && dt_params[:length] == '-1' records