Forums Forums Search & Filter Pro Multiselect: Empty terms are still active

Viewing 10 posts - 1 through 10 (of 14 total)
  • Anonymous
    #133723

    Dear Trevor, first, great plugin! It works really great, nearly perfect.

    One problem:
    I use two taxonomie filter, radio for categories and multiselect combo for tags (Chosen, with active “hide empty terms”).

    Well, if I change the category, the empty terms in the multiselect are removed, but are still active.
    The result is not updated and do not show entries.

    I have try to fix it with the following snipped, but that’s not working.

    
    	$(document).on("sf:start", ".searchandfilter", function(){
    		// Update on change cats
    		$(".searchandfilter").trigger("chosen:updated");
    		console.log('update');
    	});
    

    Do you have an idea how I can update the result after changing categories?

    Best,
    Kai

    Trevor
    #133780
    This reply has been marked as private.
    Anonymous
    #133797
    This reply has been marked as private.
    Trevor
    #133812

    Hi

    It is getting late here. I just logged in, but I can see that you have the form open, so I will look again the morning, about 11-12 hours from now.

    Anonymous
    #133824

    Oops sorry, I forgot this special feature. I am now logged out.

    Trevor
    #133835

    Wait, I just re-read the thread again. Is this your issue ….

    You make some selections, and because of those selections, some fields are completely empty, because you have Auto Count ON and Hide Empty?

    If so, that is how the plugin works at this time. You could use some custom javascript (but I would not know how to code this myself) to detect that they are empty and hide them. The FAQ page has code examples on how to detect when Ajax has fired, and your code would go inside that.

    Anonymous
    #133938

    That’s what I mean, but are you sure this is normal?
    If I disable ajax-submit and use the submit button, everything works fine.
    I think it’s a bug.

    Trevor
    #134010

    mmm

    OK, I just logged in again, and looked the search page. When I change the Category, the list of terms in Stichwort Filter changes, with no empty terms. Can you suggest a search sequence to make to see the issue?

    Anonymous
    #134065

    For example: If you select the category “Unterrichtsbausteine” and multiselect “Medienkompetenz”, then change the category to “Workshops” … the empty tags are now removed but no result is displayed.
    Only when you press now Submit manually, the correct result is displayed.

    So after the Ajax-Submit a second submit is required.

    It works with this snippet, fired after Ajax-Submit. But it’s a little bit dirty. 🙂

    setTimeout(	function() {
    	$( ".searchandfilter" ).submit();
    }, 1000);
    Trevor
    #134081
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 14 total)