title: Allow manually entered text in ui-select
body: <p>I am using a select box from ui-select. All is working fine, but I want to allow manually entered text and do not want to restrict the user from the values available in the list. If I type in text it filters my list correctly. But when I not click on an element and move on to the next field my text will get discarded.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks and regards,
  Alex</p>
  
  <p>I did not want to show my code because I think it is not correct, but it was requested:</p>
  
  <pre><code>&lt;ui-select ng-model="formData[field.id].selected" theme="bootstrap"&gt;
      &lt;ui-select-match placeholder="{{ lists[field.id].placeholder }}"&gt;{{$select.selected.text}}&lt;/ui-select-match&gt;
      &lt;ui-select-choices repeat="item in lists[field.id].list | filter: $select.search"&gt;
          &lt;div ng-bind-html="item.text | highlight: $select.search"&gt;&lt;/div&gt;
      &lt;/ui-select-choices&gt;
  &lt;/ui-select&gt;
  </code></pre>
  
  <p>The data is stored in <code>formData[field.id].selected</code>. <code>field.id</code> is the number of the current field to display (I am generating my form dynamically). Just assume that it stores an unique int value.</p>
  
  <p>Edit 08.04.2015
  <strong>My solution:</strong>
  I found out that it seems as if there is no equivalent to a C# combobox. So I went ahead and used two separate fields. It is not what I wanted, but it works for now:</p>
  
  <pre><code>&lt;ui-select ng-model="formData[field.id].selected" theme="bootstrap"&gt;
      &lt;ui-select-match placeholder="{{ lists[field.id].placeholder }}"&gt;{{$select.selected.text}}&lt;/ui-select-match&gt;
      &lt;ui-select-choices repeat="item in lists[field.id].list | filter: $select.search"&gt;
          &lt;div ng-bind-html="item.text | highlight: $select.search"&gt;&lt;/div&gt;
      &lt;/ui-select-choices&gt;
  &lt;/ui-select&gt;
  &lt;?php echo __('Create a new element if value is not in list'); ?&gt;
  &lt;div class="input-group"&gt;
      &lt;span class="input-group-addon"&gt;
          &lt;input type="checkbox" ng-model="disabled[field.id]"&gt;
      &lt;/span&gt;
      &lt;input type="text" value="" ng-disabled="!disabled[field.id]" class="form-control" ng-model="formData[field.id].newValue" /&gt;
  &lt;/div&gt;
  </code></pre>