title: jquery select2 multiselect: How can I check if options is selected or not?
body: <p>I need to catch these 2 events:</p>
  
  <ul>
  <li>first option is selected</li>
  <li>all options are deselected</li>
  </ul>
  
  <p>Reason is - that I want to disable another dropdown (which is responsible for the content of my multiselect) when the first option is selected or all previous selected are deselected.</p>
  
  <p>Update:</p>
  
  <pre><code>$('.projectSelector').on('change', function() {
          var targetProject_id = $('#project-id :selected').val();
          updateParticpantDropdown(targetProject_id);
      });
  
      function updateParticpantDropdown(selectedProjectId){
  
          $.ajax({
              type: "POST",
              url: '/xx/projects/xx/'+ selectedProjectId,
              dataType : "json",
              success: function (response, status) {
                  if(status === "success") {
  
                      //console.log('success post');
  
                      if(response.result == "error") {
  
                          alert(response.message);
  
                      }else if (response.result == "success"){
  
                          var data = response.data;
  
                          $(".participantSelector").empty().select2({
                              placeholder: "Click here to select participants for above selected project",
                              allowClear: false,
                              data: data
                          });
  
                      }
                  } else if(status === "error") {
                      // Ajax Post call failed
                      console.log('fatal ajax post call failed');
                  }
              }
          });
  }
  </code></pre>
  
  <p>This is my ajax part. When I select from the dropdown '.projectSelector' I update my multiselect '.participantSelector'.</p>
  
  <p>Works fine so far!</p>
  
  <p>What I want no is to catch the first selection in '.participantSelector' to disable '.projectSelector'. And the other way round, if nothing is selected in '.participantSelector' set '.projectSelector' active.</p>
  
  <p>My html looks like this:</p>
  
  <pre><code>&lt;select name="participant_id[]" multiple="multiple" class="form-control select2me participantSelector" required="required" id="participant-id"&gt;&lt;option value=""&gt;&lt;/option&gt;&lt;/select&gt;
  </code></pre>
  
  <p>From the docs I tried this:</p>
  
  <pre><code>$('select').on('select2:select', function (evt) {
    // Do something
  });
  </code></pre>
  
  <p>But this does fire on selection in a dropdown - but not with a selection form my multiselect.</p>
  
  <p>Btw, I get on selection in my multiselect this error displayed: </p>
  
  <blockquote>
    <p>TypeError: b.dataAdapter is null</p>
  </blockquote>