2016-07-27 56 views
0

我正在使用選擇列表kendo-drop-down-list以及k-filter="'contains'"來過濾列表。選擇列表在ng-repeat。問題是當我過濾一個列表並選擇一個特定選項時,ng-repeat中的其他列表將自動通過選定選項進行過濾。Kendo-UI Kendo-k-filter問題下拉列表

例如,當我篩選字符串"foo"的一個下拉列表並從列表中選擇"foo123"。其他下拉菜單會自動過濾字符串"foo123"

<select kendo-drop-down-list id="LookUp{{$index}}" 
    k-data-text-field="'Text'" 
    k-data-value-field="'Value'" 
    k-data-source="enrichedValueSource" 
    ng-if="data.lookUp.length" 
    ng-model="item.EnrichId" 
    k-index="'{{item.EnrichId}}'" 
    k-filter="'contains'" 
    class="full-width m-b form-control" required ng-change="itemChange(item)"> 
</select> 

該問題的圖像。 1 Drop-down with search Text 2. 2nd Drop-down automatically binds for search text in 1st Drop-Down

回答

0

似乎所有的DropDownLists使用共享數據源實例 - enrichedValueSource。因此,與DropDownList實例之一交互時觸發的更改將影響所有其他DropDownLists。如果enrichedValueSource是一個DataSource實例,則切換到DataSource配置對象。這樣,所有的DropDownLists將複製提供的設置並創建他們自己的DataSource實例。