Add custom title for data keys in alarm table widget.
This commit is contained in:
		
							parent
							
								
									42f3a2def0
								
							
						
					
					
						commit
						760e380552
					
				@ -16,6 +16,10 @@
 | 
			
		||||
 | 
			
		||||
-->
 | 
			
		||||
<section class="tb-widget-settings" [formGroup]="alarmsTableKeySettingsForm" fxLayout="column">
 | 
			
		||||
  <mat-form-field fxFlex class="mat-block">
 | 
			
		||||
    <mat-label translate>widgets.table.custom-title</mat-label>
 | 
			
		||||
    <input matInput formControlName="customTitle">
 | 
			
		||||
  </mat-form-field>
 | 
			
		||||
  <mat-form-field fxFlex class="mat-block">
 | 
			
		||||
    <mat-label translate>widgets.table.column-width</mat-label>
 | 
			
		||||
    <input matInput formControlName="columnWidth">
 | 
			
		||||
 | 
			
		||||
@ -40,6 +40,7 @@ export class AlarmsTableKeySettingsComponent extends WidgetSettingsComponent {
 | 
			
		||||
 | 
			
		||||
  protected defaultSettings(): WidgetSettings {
 | 
			
		||||
    return {
 | 
			
		||||
      customTitle: '',
 | 
			
		||||
      columnWidth: '0px',
 | 
			
		||||
      useCellStyleFunction: false,
 | 
			
		||||
      cellStyleFunction: '',
 | 
			
		||||
@ -52,6 +53,7 @@ export class AlarmsTableKeySettingsComponent extends WidgetSettingsComponent {
 | 
			
		||||
 | 
			
		||||
  protected onSettingsSet(settings: WidgetSettings) {
 | 
			
		||||
    this.alarmsTableKeySettingsForm = this.fb.group({
 | 
			
		||||
      customTitle: [settings.customTitle, []],
 | 
			
		||||
      columnWidth: [settings.columnWidth, []],
 | 
			
		||||
      useCellStyleFunction: [settings.useCellStyleFunction, []],
 | 
			
		||||
      cellStyleFunction: [settings.cellStyleFunction, [Validators.required]],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user