2016-11-02 4 views
6

dropdown listui-selectがあります。ドロップダウン値ui-selectの値に基づいて値はバインドされています。その特定の値を直接ui-selectに貼り付けると、選択されたものとして表示されます。 ui-selectにコピーの貼り付け値が表示されないようにするにはどうすればよいですか?AngularJSでui-selectで貼り付けた値をコピーしない方法

例を以下に示します。

選択クエリ
    <div class="dropdown-Finding"> 
         <ui-select class="form-control dropdown-reviwerFinding-select" id="searchBarArea" onkeypress="return false;" multiple tagging tagging-label="false" ng-model="QiReviewerFindingType.selectedItems" theme="bootstrap"> 
          <ui-select-match placeholder="Select Reviewer Findings">{{$item.ShortDescription}}</ui-select-match> 
          <ui-select-choices repeat="qiQueryFinding in qiQueryFindings | filter:$select.search"> 
           {{qiQueryFinding.ShortDescription}} 
          </ui-select-choices> 
         </ui-select> 
         <span class="carat" open-menu-by-click="searchBarArea"></span> 
        </div> 
+0

コードを入力できますか? – BorHunter

+0

達成しようとしていることとユースケースは何ですか?コピー貼り付けの入力をブロックする理由を説明するのは少し難しいです – Icycool

+0

例を示します。 –

答えて

0

http://plnkr.co/edit/BVaXpviCACi5sd3aw9oX?p=preview

コードのこれらの種類を使用してください。

<ui-select ng-model="ctrl.person.selected" theme="select2" on-select="ctrl.onSelectCallback($item, $model)" ng-disabled="ctrl.disabled" style="min-width: 300px;" title="Choose a person"> 
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match> 
<ui-select-choices repeat="person.email as person in ctrl.people | propsFilter: {name: $select.search, age: $select.search}"> 
    <div ng-bind-html="person.name | highlight: $select.search"></div> 
    <small> 
    email: {{person.email}} 
    age: <span ng-bind-html="''+person.age | highlight: $select.search"></span> 
    </small> 
</ui-select-choices> 

私は正確な違いを把握しようとしましたが、私はできませんでした。しかし、サンプルの上にある場合がありますあなたを助けるでしょう。

関連する問題