2023-02-02 15:25:04 +02:00
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
Copyright © 2016-2022 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-02-13 16:11:23 +02:00
|
|
|
<section [formGroup]="stringItemsForm">
|
|
|
|
|
<mat-form-field fxFlex class="mat-block" [floatLabel]="floatLabel" [appearance]="appearance">
|
|
|
|
|
<mat-label *ngIf="label">{{ label }}</mat-label>
|
|
|
|
|
<mat-chip-list #itemsChipList formControlName="items" [required]="required">
|
|
|
|
|
<mat-chip *ngFor="let item of stringItemsList"
|
2023-02-02 15:25:04 +02:00
|
|
|
[selectable]="!disabled"
|
|
|
|
|
[removable]="!disabled"
|
2023-02-13 16:11:23 +02:00
|
|
|
(removed)="removeItems(item)">
|
|
|
|
|
{{item}}
|
2023-02-02 15:25:04 +02:00
|
|
|
<mat-icon matChipRemove *ngIf="!disabled">close</mat-icon>
|
|
|
|
|
</mat-chip>
|
2023-02-13 16:11:23 +02:00
|
|
|
<input placeholder="{{ placeholder }}"
|
|
|
|
|
[matChipInputFor]="itemsChipList"
|
2023-02-02 15:25:04 +02:00
|
|
|
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
|
|
|
|
|
matChipInputAddOnBlur
|
2023-02-13 16:11:23 +02:00
|
|
|
(matChipInputTokenEnd)="addItem($event)">
|
2023-02-02 15:25:04 +02:00
|
|
|
</mat-chip-list>
|
2023-02-13 16:11:23 +02:00
|
|
|
<mat-hint>{{ hint }}</mat-hint>
|
|
|
|
|
<mat-error *ngIf="stringItemsForm.get('items').hasError('required')">{{ requiredText }}</mat-error>
|
2023-02-02 15:25:04 +02:00
|
|
|
</mat-form-field>
|
|
|
|
|
</section>
|