Skip to content

Commit

Permalink
set sort to work on apply instead of on change of sort radios (#4284)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbodine1 committed Aug 27, 2024
1 parent 24833c7 commit f471e4b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/assets/javascripts/plan_shopping.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ function applyPlanFilters() {
applyPlanFilterCBs("plan-metal-network-selection-filter", "data-plan-network", "data-plan-metal-network")
];
combineAllPlanSelectors(all_selectors);
$("#filter-sidebar input[type='radio']").prop("checked", false);
$("strong#plans-count").text($(".plan-row:visible").length);
$("dd#plans-count").text($(".plan-row:visible").length);
}
Expand Down Expand Up @@ -325,6 +324,9 @@ $(function() {
$(document).on('click', '.all-filters-row .apply-btn', function(){
applyPlanFilters();

const sort_by = $('#sort_by input:checked').data('sort-by');
applyPlanSort(sort_by);

if ($('.aptc').length > 0){
var elected_aptc = $("input#elected_aptc").val();
var coverage_kind = $("input#coverage_kind").val();
Expand Down Expand Up @@ -383,10 +385,6 @@ $(function() {
}
}

$(document).on('change', '#sort_by input', function(){
applyPlanSort($(this).data('sort-by'));
});

$(document).on('click', "#ivl_plans .plan-select.btn-default.select", function(e){
var url = $(this).data('url');
if ($('.aptc').length > 0){
Expand Down

0 comments on commit f471e4b

Please sign in to comment.