</div>
</div>
</div>
+
+<eg-string #cspFlairTooltip i18n-text text="Limited Editing"></eg-string>
+<div class="w-100 mt-2 mb-2">
+ <eg-grid idlClass="csp"
+ [dataSource]="cspSource"
+ [rowFlairIsEnabled]="true"
+ [rowFlairCallback]="cspRowFlairCallback">
+ </eg-grid>
+</div>
+
+
@ViewChild('bresvEditor')
private bresvEditor: FmRecordEditorComponent;
-
- // @ViewChild('helloStr') private helloStr: StringComponent;
+ @ViewChild('cspFlairTooltip') private cspFlairTooltip: StringComponent;
+ cspRowFlairCallback: (row: any) => GridRowFlairEntry;
gridDataSource: GridDataSource = new GridDataSource();
btSource: GridDataSource = new GridDataSource();
acpSource: GridDataSource = new GridDataSource();
+ cspSource: GridDataSource = new GridDataSource();
editSelected: (rows: IdlObject[]) => void;
@ViewChild('acpGrid') acpGrid: GridComponent;
@ViewChild('acpEditDialog') editDialog: FmRecordEditorComponent;
}
} )
});
+
+ this.cspSource.getRows = (pager: Pager, sort: any[]) => {
+ // ... paging, etc.
+ return this.pcrud.retrieveAll('csp');
+ }
+
+ this.cspRowFlairCallback = (row: any): GridRowFlairEntry => {
+ // Define in ngOnInit() so we can access 'this'
+ const flair = {icon: null, title: null};
+ if (row.id() < 100) {
+ flair.icon = 'not_interested';
+ // String is static text -- no interpolation required.
+ flair.title = this.cspFlairTooltip.text;
+ }
+ return flair;
+ }
}
sbChannelHandler = msg => {