jquery - Angular 2 - ng2-smart-table - global search on a rendered field -
i have ng2-smart-table global search filter interacts fields of table. work columns doesn't have rendering. code
onsearch(query: string = '') { if(query != ""){ this.pages.setfilter( [ // fields want include in search { field: 'producttypedescription', search: query }, { field: 'products', search: query }, { field: 'varianti', search: query } ], false); }
and these columns
producttypedescription: { title: 'tipo prodotto', filter: false, class: "colonnetabella", width: "20%", }, products: { title: 'prodotto', filter: false, class: "colonnetabella", width: "20%", valuepreparefunction: (products) => { var output =""; var outputs = ""; products.foreach(function(item){ output = item.productdescription item.variantlist.foreach(function(el){ outputs= output; }) }) console.log(outputs) return outputs; //return json.stringify(value)} } }, varianti: { title: 'varianti', filter: false, class: "colonnetabella", type: 'custom', width: "20%", rendercomponent: variantsproductrendercomponent, }
my search works on first column, doesn't on "varianti" , "products". didn't find question, know possible solution? thanks
Comments
Post a Comment