title: Select2 dropdown allow new values by user when user types
body: <p>The select2 component can be configured to accept new values, as ask in <a href="https://stackoverflow.com/questions/14577014/select2-dropdown-but-allow-new-values-by-user">Select2 dropdown but allow new values by user?</a> </p>
  
  <p>And you can see it at: <a href="http://jsfiddle.net/pHSdP/646/" rel="nofollow noreferrer">http://jsfiddle.net/pHSdP/646/</a> the code is as below:</p>
  
  <pre><code>$("#tags").select2({
      createSearchChoice: function (term, data) {
          if ($(data).filter(function () {
              return this.text.localeCompare(term) === 0;
          }).length === 0) {
              return {
                  id: term,
                  text: term
              };
          }
      },
      multiple: false,
      data: [{
          id: 0,
          text: 'story'
      }, {
          id: 1,
          text: 'bug'
      }, {
          id: 2,
          text: 'task'
      }]
  });
  </code></pre>
  
  <p>The problem is that the new value is only added to the list if you enter new value and press enter, or press tab. </p>
  
  <p>Is it possible to set the select2 component to accept this new value when use types and leave the select2. (Just as normal html input tag which keeps the value which you are typing when you leave it by clicking some where on the screen)</p>
  
  <p>I found that the select2 has <code>select2-blur</code> event but I don't find a way to get this new value and add it to list?! </p>