2023-04-14 19:18:35 +03:00
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
Copyright © 2016-2023 The Thingsboard Authors
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
|
|
-->
|
2023-05-16 20:00:53 +03:00
|
|
|
<mat-button-toggle-group *ngIf="!isMdLg || !useSelectOnMdLg; else select" class="tb-toggle-header"
|
2023-05-25 17:03:52 +03:00
|
|
|
[ngClass]="{'tb-fill': (appearance === 'fill' || appearance === 'fill-invert'),
|
|
|
|
|
'tb-invert': appearance === 'fill-invert',
|
|
|
|
|
'tb-ignore-md-lg': ignoreMdLgSize}" [name]="name" [(ngModel)]="value"
|
2023-04-19 13:55:51 +03:00
|
|
|
(ngModelChange)="valueChange.emit(value)">
|
2023-05-25 17:03:52 +03:00
|
|
|
<mat-button-toggle *ngFor="let option of options; trackBy: trackByHeaderOption" [value]="option.value">{{ option.name }}</mat-button-toggle>
|
2023-04-14 19:18:35 +03:00
|
|
|
</mat-button-toggle-group>
|
2023-04-17 19:09:23 +03:00
|
|
|
<ng-template #select>
|
|
|
|
|
<mat-form-field appearance="outline" class="tb-toggle-header-select" subscriptSizing="dynamic">
|
2023-04-19 13:55:51 +03:00
|
|
|
<mat-select [(ngModel)]="value" (ngModelChange)="valueChange.emit($event)">
|
2023-04-17 19:09:23 +03:00
|
|
|
<mat-option *ngFor="let option of options" [value]="option.value"> {{ option.name }}</mat-option>
|
|
|
|
|
</mat-select>
|
|
|
|
|
</mat-form-field>
|
|
|
|
|
</ng-template>
|