To let users know when the template is refreshing, we can use the facetwp-refresh and facetwp-loaded events to inject HTML into the template.

Add the following code to your (child) theme’s functions.php to add a <div> with the text “Loading…” above the template. You can customize the HTML to display an image, loading gif, or whatever else you need:

add_action( 'wp_head', function() {
?>
  <script>
    (function($) {
      $(document).on('facetwp-refresh', function() {
        $('.facetwp-template').prepend('<div class="is-loading">Loading...</div>');
      });
      $(document).on('facetwp-loaded', function() {
        $('.facetwp-template .is-loading').remove();
      });
    })(jQuery);
  </script>
<?php
}, 100 );

See also