2017-02-23 42 views
0

我使用的是aldeed表格。如何过滤/搜索助手的列

一切都很好,但是当我添加一个集合帮助者行时,这行不可排序也不可搜索。

New Tabular.Table定义是:

TabularTables.Cars = new Tabular.Table({ 
name: "CarsTable", 
collection: Cars, 
extraFields: ['importDate', 'dateExp', 'dateDeSortie'], 
columns: [ 
{ data: "importDate", title: "Date d'Import", 
render: function (data) { if (!data) return ""; return moment(data).format(Global.DATE_FORMAT); } }] 

搜索功能是:

switch (idxCol) { 
case 0: 
searchTerm = this.searchPatternDateImport()} 
var col = $("#carsTable").DataTable().column(idxCol);//1.2.3.4 col.search(searchTerm).draw(); 

我怎样才能解决这个问题?

回答

0

看起来在这个时候,Tabular Table没有提供开箱即用的解决方案来排序和搜索动态呈现的属性。
这是由于事实,在排序和搜索引擎盖下Tabular使用您的集合(在新的Tabular.Tables({})中定义为“集合”参数 - 在您的示例“汽车”集合)实际doesn'包含动态呈现的字段。由于该字段不在相应的集合中(仅存在于虚拟目录中),因此无法对其进行分类或搜索。

查看此处的更多讨论:https://github.com/aldeed/meteor-tabular/issues/162