Disable popup sidebar auto-closure

This article deals with the customization of the default behavior for togglable annasta presets set to instant AJAX filtering style. For instructions on enabling the “Filters” button-controlled togglable presets, please read about the Visibility setting.

To disable the togglable preset auto-collapse on instant AJAX submissions, add the following snippet in the Custom JavaScript field of the annasta Filters > Plugin settings admin tab:

if( 'undefined' !== typeof(  awf_data  ) ) {
  awf_data.togglable_preset.close_preset_on_ajax_update = false;
}

The above will affect both the off-canvas popup sidebars, and presets set to the “Filters” button mode that toggles preset visibility under the “Filters” button.