@ViewChild('endSurveySuccessString', { static: true }) endSurveySuccessString: StringComponent;
@Input() sortField: string;
- @Input() idlClass='asv';
+ @Input() idlClass = 'asv';
@Input() dialogSize: 'sm' | 'lg' = 'lg';
constructor(
ngOnInit() {
this.gridDataSource.getRows = (pager: Pager, sort: any[]) => {
- const orderBy: any = {};
- if (sort.length) {
- // Sort specified from grid
- orderBy[this.idlClass] = sort[0].name + ' ' + sort[0].dir;
- } else if (this.sortField) {
- // Default sort field
- orderBy[this.idlClass] = this.sortField;
- }
+ const orderBy: any = {};
+ if (sort.length) {
+ // Sort specified from grid
+ orderBy[this.idlClass] = sort[0].name + ' ' + sort[0].dir;
+ } else if (this.sortField) {
+ // Default sort field
+ orderBy[this.idlClass] = this.sortField;
+ }
- const searchOps = {
- offset: pager.offset,
- limit: pager.limit,
- order_by: orderBy
- };
+ const searchOps = {
+ offset: pager.offset,
+ limit: pager.limit,
+ order_by: orderBy
+ };
return this.pcrud.retrieveAll('asv', searchOps, {});
};