2013-08-07 33 views

回答

0

如果我理解正確的話,你可以做

var filters = store.getFilters(); // Get the filters using getFilters 

store.clearFilter();  // Clear the filters from store  

var item = store.findRecord('fieldName', 'value'); //Get the item from store  

if (item) store.remove(item); //Remove the item from store  

store.setFilters(filters); // Again set the filters using setFilters       

文件參考

getFilters()

clearFilter()

setFilters()

只是在文檔中的參考可能會解決您的問題。

+0

謝謝,我已經試過這一點,但它似乎並沒有放回過濾器時,我打電話store.setFilters(fiiters)。 –

+0

有什麼錯誤?和console.log(store)來查看它的過濾器配置 – Viswa

0

編輯

// Get the filters using getFilters 
var filters = store.getFilters(); 

// Clear the filters from store   
store.clearFilter();  

//Get the item from store 
var item = store.findRecord('fieldName', 'value');   

//Remove the item from store  
if (item) store.remove(item); 

// Again set the filters using setFilters 
store.filter(filters); 
相關問題