Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @hidden
- */
- @Output()
- protected onDensityChanged = new EventEmitter<any>();
- @Input()
- public get displayDensity(): DisplayDensity | string {
- return this._displayDensity;
- }
- /**
- * Sets the display density currently applied to the grid.
- * ```html
- * <igx-grid #grid [data]="localData" [displayDensity]="'compact'" [autoGenerate]="true"></igx-grid>
- * ```
- * @memberof IgxGridComponent
- */
- public set displayDensity(val: DisplayDensity | string) {
- switch (val) {
- case 'compact':
- this._displayDensity = DisplayDensity.compact;
- break;
- case 'cosy':
- this._displayDensity = DisplayDensity.cosy;
- break;
- case 'comfortable':
- default:
- this._displayDensity = DisplayDensity.comfortable;
- }
- this.onDensityChanged.emit();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement