【发布时间】:2018-12-27 16:21:35
【问题描述】:
我想在 Grid 上隐藏一条从服务器返回的记录。
我已在商店中设置了 filter,并且可以访问该特定数据,但我将如何处理隐藏/忽略此记录?
fooStore: {
....
filters: [
function(item) {
let me = this;
let theRecord = item.data.status === MyApp.STATUS; //true
if (theRecord) {
console.log(theRecord); //True
console.log("So filter is here!!")
//How to hide/ignore/avoid to load this specific data record to load Grid??
}
}
]
},
返回的 JSON;
{
"success": true,
"msg": "OK",
"count": 3,
"data": [
{
//Filter achives to this record and aim to hide this one; avoid to load this record.
"id": 102913410,
"status": "P"
},
{
"id": 98713410,
"status": "I"
},
{
"id": 563423410,
"status": "A"
}
]
}
【问题讨论】: