akveo / akveo/ng2-smart-table

Unable to search into custom rendered cells

Open
#477 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.6k
Forks
867
PR merge metrics
No merged PRs in 30d

Description

One side-effect of rendering a "custom" field is that the global search is no longer able to work in it. I believe this happens because the cell starts out as a json Object and then I render just one string in that object. As a consequence, the global search is unable to reach into it. I'm basically looping through a list of objects and then displaying a single property (string) from that object to display in that cell. Unfortunately, all of that text is invisible to the global search. Is there a way I can add custom rendered text to the global search? I've included the code for the rendered component:

```
@Component({
selector: 'scope-renderer',
template: `



  • {{ scope.displayName }}


`
})
export class ScopeRendererComponent implements OnInit {
@Input() rowData: any;

scopes: Array;

ngOnInit() {
this.scopes = this.rowData.scopes;
}
}

class Scope {
name: string;
displayName: string;
description: string;
required: boolean;
emphasize: boolean;
showInDiscoveryDocument: boolean;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.