jquery-select2 Questions

8

I'm building a 'natural language' search form using a series of inline select inputs, using jQuery Select2 for styling. The widths of the Select2 inputs appear to be set to the width of the selecte...
Brandonbrandt asked 21/6, 2016 at 11:54

8

I am using select2 to set the dropdownautowidth to true on my SharePoint search page and it works perfectly on page load for the first time. After i search for some keyword, the page loads with sea...
Coretta asked 6/1, 2014 at 13:47

10

Solved

I want to deselect all values with one click without using each id seperately. I fiddled around for a while, but this deselect only first value. Any suggestions? This is how I try to deselect: $...
Muscadel asked 13/9, 2013 at 8:57

15

Solved

I am trying to clone a row which contains select2 tool ,when i clone that row using jQuery the cloned select2 is not responding.In image given below first select2 which is original is working fine ...
Geanine asked 18/6, 2013 at 17:46

21

Solved

I'm using jQuery select2 multi select dropdown. I need to select all options in a dropdown from code. Basically there is a Select All checkbox on which this functionality has to be implemented, I w...
Savoury asked 14/5, 2013 at 8:29

6

Solved

Is there a way to make a multi-select not wrap when selecting enough values to do so? As an example, here's what it does: What I want is for it to all be contained in one line and be accessible ...
Tutelary asked 17/3, 2014 at 20:21

17

Solved

I have downloaded select2 and "installed it" by putting it into my folder. I then loaded it on my site and when I check the console I can see the file select2.js (where I see all of the ...
Husbandry asked 17/11, 2013 at 18:29

3

Solved

When using Select2 on initially hidden <select> with multiple attribute, the placeholder does not show up. Looking at the code I can see that selector .select2-container--default .select2-sea...
Aphesis asked 5/6, 2018 at 9:43

8

I need to set an array of data after initializing select2. So I want to make something like this: var select = $('#select').select2({}); select.data([ {id: 1, text: 'value1'}, {id: 1, text: 'val...
Secund asked 16/3, 2013 at 20:30

3

Solved

Following is my code: $('#cow_id_2').select2({ allowClear: true, placeholder: "Search a cow/dam ID", formatNoMatches: function (term) { return "<a href=/'http://google.com/'>Add</a&gt...
Sitra asked 13/6, 2016 at 19:22

10

Solved

I am using Select2 3.3.2 I have very very long options in the select. Example: <select id="e1"> <option value="AL">Alabama</option> <option value="WY">Wyoming</option&g...
Inactivate asked 13/5, 2013 at 9:53

15

Solved

I have a select2 v4.0.0 being populated from an Ajax array. If I set the val of the select2 I can see via javascript debugging that it has selected the correct item (#3 in my case), however this is...
Boulevardier asked 19/5, 2015 at 4:7

3

What I am trying to achieve is, there are two models A and B with a relationship of One to many, where A has many B. So if the records for A and B have already been created, A can be assigned to ma...
Drandell asked 9/3, 2021 at 11:24

3

I'm currently testing Select2.js in my ASP.NET MVC project. The first test on a "normal" view just worked fine but now I'm trying to add this to a select box inside a partial view that gets loaded...
Psychic asked 25/10, 2017 at 8:36

4

Solved

I'm using Select2 4.0. I have a list of options, some of which are "deleted" and I want to signify which are which. My select element is like this: <style>.deleted { color: red; }</style&...
Borstal asked 25/11, 2015 at 21:4

4

Solved

I'm using Select2 in a modal but it isn't working quite right, as you can see here: https://gyazo.com/a1f4eb91c7d6d8a3730bfb3ca610cde6 The results appear behind the modal. How can I fix this? I've...
Martelli asked 30/3, 2016 at 13:59

4

Solved

I am using select2 for displaying a multiple selection component. Instead of showing the close icon(x) to the left of the item, how can I move it to the right of the selected item?
Sparteine asked 12/8, 2016 at 14:43

8

I need to implement a select similar to this http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/ I want to use select2 for this, but I haven't been able to find anything from the...
Gaytan asked 7/4, 2014 at 16:37

16

Solved

I am binding my dropdown with Jquery-Select2. It's working fine but now I need to bind my Multi-Value selectBox by using Jquery-Select2. My DropDown <div class="divright"> <sele...
Glyptography asked 15/10, 2012 at 5:4

3

Solved

I am trying to update the options of the Select2 input field with an AJAX call, but the onkeyup function linked to the input field does not run. *Note that the onkeyup function does run when I set...
Brost asked 31/3, 2017 at 8:49

3

I'm using select2 plugin (latest version 4.0.2) for autocomplete in my probject. I found that select2 can be applied only to select control. The main problem is that text input placed as first opt...
Buroker asked 21/1, 2017 at 16:39

37

I love the select2 box from https://github.com/ivaynberg/select2 I am using the format: option to format each element, and it looks great. Everything is fine except the selected element is bigger ...
Rapallo asked 12/2, 2013 at 2:57

36

Solved

When I use a select2 (input) in bootstrap modal, I can't type anything into it. It's like disabled? Outside the modal select2 works fine. Working example: http://jsfiddle.net/byJy8/1/ code: <!-...
Autobahn asked 28/8, 2013 at 11:49

3

Solved

I am having an issue with select2 where after I enter an item and I want to use the same dropdown again, i can't seem to remove the previously selected item For example, lets say my id is "#Strea...
Hymanhymen asked 6/12, 2015 at 14:33

2

Solved

I just fresh-installed a Laravel 9 app, added select2 and jquery with npm, passed what I needed to pass to vite.config.js and app.js, jquery is getting loaded way before select2 is loaded and yet s...
Anechoic asked 1/12, 2022 at 17:51

© 2022 - 2024 — McMap. All rights reserved.