我想应用类似的过滤器 this.Grid.option(“dataSource”)。filter(x => x.Placeholder!= null)
但它不起作用
当我做的时候
的console.log(this.Grid.option( “数据源”));
我得到了
(72)[{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...} ,{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{ ......},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...} ,{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{ ......},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...} ,{...},{...},{...},{...},{...},{...},{...},{...},{...},{...},{...}, ob < / strong>:Observer] 0: { ob :观察者} 1: 占位符 : (......) PlaceholderDescr : (......) 的recordId : (......) 的 OB : 观察者{值:{...},dep:Dep,vmCount:0} 得到占位符 : ƒactiveGetter() 设置占位符 : ƒactiveSetter(newVal) 获取PlaceholderDescr : ƒactiveGetter() 设置PlaceholderDescr : ƒactiveSetter(newVal) 得到RecordID : ƒactiveGetter() 设置RecordID : ƒactiveSetter(newVal) 的原 : 宾语 2 : { ob :观察员}
答案 0 :(得分:0)
通过ds = this.Grid.getDataSource()
(documentation)
然后您可以通过ds.filter(expr)
方法过滤ds。有关详细信息,请查看this topic