Forum Discussion
Mike Jansen
Oct 10, 2017Iron Contributor
pnp.sp.search > Add property to searchresults
I have this code: private GetSearchresults(): void {
pnp.sp.search(<SearchQuery>{
Querytext: "ContentType:TEST_matters",
RowLimit: 10,
EnableInterleaving: true,
Selec...
Leonardo Tabosa
Oct 16, 2018Copper Contributor
This is what I did to fix this problem.
First I create other Interface that extends from the SearchResult:
export interface MySearchResult extends pnp.SearchResult{
RefinableString10?:string;
}
Than instead of use the parameter result: SearchResult i used result: MySearchResult
In the example should be instead of function(object) you could use result:MySearchResult