Category "jquery-select2"

Trying to use select2 with Importmaps on Rails 7

I am trying to use Select2 on a new Rails 7 app and am struggling as follows: I have pinned it into my import maps and imported it like so: pin "application", p

how to insert data into select2 search input after scan using qrcode

Example results that i want : I already did the qrcode scan and select2. It is working fine. The problem is I want that data "SBD2P3000002" to be searched in

How can I set option value selected in v-select in vue.js 2?

I am trying to set option selected where option value is 1. But I am getting in trouble when using v-select from vuejs. This is how I am trying to do - <v-

How to use different colors for each select2 option?

I'm using a select2 dropdown, and would like to set different colours on each options. Example: <select class="select2" name="fruit"> <option cl

Select2: Hide certain optgroup dynamically

I need to hide/show a certain option group (<optgroup>) conditionally and I've tried the top solution from this question - Select2: Hide certain options d

A MultiSelectField with a select2 widget is not properly working for EDIT in Django

I have a form I am trying to understand its behaviour in Django. The form code looks like : class RequestForm(forms.ModelForm): TIMEPOINTS = (

Prevent select2 from opening when a tag is clicked

This question evolved into preventing the dropdown from opening on enter key press. As you can see, my ugly solution closes the dropdown with a setTimeout when

select2 and axios: success is not a function

I am new to javascript, callback functions and select2. Thanks in advance for your help :) I am looking at implementing select2 to search against an API but I

jira multiselect customfield AUI selest2 defined in plugin does not pick any options

I'm completly stuck trying to implement AUI.select2 style multiselect customfield in jira plugin. in main class I just declare the constructor and do not overri

Select2 not working correctly when options in the dropdown are being enabled or disabled

I'm using select2 for a dropdown so the use could add new tasks for a project. When the task is being selected - a row in a table is being added and the option

Allow the addition of new values to a ChoiceType Field

I use Form Component and have a ChoiceType field on the form which is rendered to a select field. On the client-side I use select2 plugin which initializes a se

Filter by id as well as text in Select2

var data = [{ id: 11-07, text: 'enhancement' }, { id: 11-04, text: 'bug' }, { id: 11-08, text: 'duplicate' }, { id: 11-09, text: 'invalid' },

Select2 - Multi Select Autocompletion - Programmatically population of field

I am using the bundled AUI Select2 Lib in a JIRA 8.13 instance. What I would like to try is to code an autocompletion field with multiple values. My main compon

Select2 with ajax gets initialized several times with Rails turbolinks events

I am a developing a Ruby On Rails app using Rails 4.2.6. I am using Turbolinks alongside jquery.turbolinks (sorry I could'nt post the links to those elements as

Programmatically set the value of a Select2 ajax

I have a Select2 auto-complete input (built via SonataAdmin), but cannot for the life of me figure out how to programmatically set it to a known key/value pair.

How do I Listen to Select2 Events in a Stimulus Controller?

I am trying to listen to a Select2 event in a Stimulus controller via the data-action. I have a stimulus controller, where I have included an event listener for

Select2 - use JSON as local data

I can get this to work... var options = [{id: 1, text: 'Adair, Charles'}] $('#names').select2({ data: options, }) But i cant work out how to get from h