title: Get items from Select2 after data has been loaded
body: <p>I'm trying to force the open method and select item with select2 like this.</p>
  
  <pre><code>    $(".select").select2('open')
      $(".select").on('select2-loaded', function (e) {
          items = e.items.results;
          if (items.length == 1) {
              $(this).val(items[0].text);
          }
      });
      $(".select").select2('close');
  </code></pre>
  
  <p>But I cannot get inside the select2-loaded evaluation and the close is happening also to quick. I want to select the first element by default if there is only one element on the list.</p>
  
  <p>When the 'open' occurs, it automatically performs the mechanism to get and load all the elements in my list. If I comment the close method it will take some milliseconds to display the elements on the list.</p>
  
  <p>But what I want is to refresh my list (this is done by the open) then I want to select only if there one element and the close my list ('select')</p>
  
  <p>How can I achieve this? This behaviour will be trigger by a onchange event of another list. (nested selects)</p>