I am trying to: Reset the Views search for my Discography page
Link to a page where the issue can be seen: versteckter Link
I expected to see: Each default label should return to initial "All" text
Instead, I got: the dropdown that is from a Toolset Taxonomy for Genre has it's default label disappear after the Reset button is clicked. The other dropdown are from custom fields and they are fine.
Hi, can you try the following troubleshooting steps first?
- Choose Elementor or Toolset Layouts, but do not use both at the same time. These plugins are not recommended for use together. We have more information about using Toolset and Elementor together here: https://toolset.com/documentation/user-guides/using-toolset-with-elementor-page-builder/
- Temporarily disable any custom JavaScript code you have active on the site.
- Update all your plugins and theme to the latest versions, then clear your browser cache and test again.
- If the problem is still happening, please deactivate all plugins except Types and Views, then test again. If the problem is resolved, reactivate your other plugins one by one until the problem returns.
- If the problem was not resolved, I'll be glad to take a closer look.
Hi - I created a test page and removed a header made in Eliminator that used javascript. That fixed the issue but unfortunately I have to use that header on every page. Is there some code I can add to the view that will force the taxonomy dropdown to refresh the default label after the reset button is clicked? I notice on the test page without the header that when the reset button is clicked the other dropdowns based on custom fields refresh the default label immediately but the taxonomy dropdown does not refresh until all the albums in the discography refresh. Link to test page: versteckter Link
That fixed the issue but unfortunately I have to use that header on every page. Is there some code I can add to the view that will force the taxonomy dropdown to refresh the default label after the reset button is clicked?
Is there one specific piece of JavaScript code in your header that is causing this problem? If so, can you share it?
There is a front-end event triggered after the search form has been updated. You could listen for that event and trigger your own custom JavaScript code like this:
jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) {
/**
* data.view_unique_id (string) The View unique ID hash
* data.view_changed_form (object) The jQuery object for the View form after being updated
* data.view_changed_form_additional_forms_only (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-form-view] shortcode
* data.view_changed_form_additional_forms_full (object) The jQuery object containing additional forms from other instances of the same View inserted using the [wpv-view] shortcode
*/
console.log('The search form has been updated. Do something else now.');
});
My issue is resolved now. Thank you!
Just as a Follow-Up. I can still reproduce this problem If I Put a parametric search in the same page when using one shortcode for the search only and one for the output. This does not work with resetting the taxonomy filters.
Can easily be fixed when putting the one shortcode that outputs both.