Include Select2 search field

This topic contains 5 replies, has 4 voices, and was last updated by  gowrann 4 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #542464

    gowrann
    Expired Member
    Post count: 39

    Hi,

    Any snippets to include the default select2 search field at the top of a category list – could ease the selection for a lot of categories.

    #542469

    gowrann
    Expired Member
    Post count: 39

    I tried this jquery but it is not enabling the search…

    
          jQuery('#gd_placecategory').on('select2:opening select2:closing', function( event ) {
                var $searchfield = $(this).parent().find('.select2-search__field');
                $searchfield.prop('disabled', false);
            });
    
    #542512

    Alex Rollin
    Moderator
    Post count: 27815

    The developers will take a look at your idea when they get back to the office, probably Monday. They will let you know if there is an easy solution for that.

    #542735

    Naveen Giri
    Moderator
    Post count: 1559

    Hi, gowrann

    The select2 input element becomes the search box for multiple selects.
    Just type in the input box, you will notice the option get shorted as you type.

    Regards
    Naveen

    #542752

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    As Naveen mentions, this input already works as a search, simply start typing the cat name. You can edit the field description to make this more clear if you wish.

    Stiofan

    #542759

    gowrann
    Expired Member
    Post count: 39

    Ok yes, I see.

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount