app/views/shared/_sortable_tr.html.erb
<%= table_column add_style: add_style, add_class: add_class do %>
<div class="d-flex justify-content-between align-items-center">
<%= title %>
<div class="ml-2">
<%= link_to(tag.span("", class: "fas fa-angle-up datatable-thead-icon #{'text-primary' if selected == 'up'}"), sorted_by: column, sorted_direction: "asc", page: @page) %>
<%= link_to(tag.span("", class: "fas fa-angle-down datatable-thead-icon #{'text-primary' if selected == 'down'}"), sorted_by: column, sorted_direction: "desc", page: @page) %>
</div>
</div>
<% end %>