Refresh Sort facet on change when auto-refresh is disabled

<?php
// See: https://facetwp.com/how-to-disable-facet-auto-refresh-and-add-a-submit-button/
add_action( 'wp_head', function() {
  ?>
    <script>
      (function($) {
        $(document).on('change','.facetwp-type-sort select', function() {
          FWP.refresh();
        });
      })(jQuery);
    </script>
  <?php
}, 100 );