Browse Source

UI: Fix entity autocomplete component.

pull/12875/head
Igor Kulikov 2 years ago
parent
commit
e530dec250
  1. 3
      ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.html
  2. 2
      ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html
  3. 8
      ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts

3
ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.html

@ -83,8 +83,7 @@
<tb-entity-autocomplete <tb-entity-autocomplete
class="flex flex-1" class="flex flex-1"
formControlName="id" formControlName="id"
[hideLabel]="true" inlineField
[inlineField]="true"
[placeholder]="'action.set' | translate" [placeholder]="'action.set' | translate"
[required]="true" [required]="true"
[entityType]="ArgumentEntityTypeParamsMap.get(entityType).entityType" [entityType]="ArgumentEntityTypeParamsMap.get(entityType).entityType"

2
ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.html

@ -23,7 +23,7 @@
[appearance]="inlineField ? 'outline' : appearance" [appearance]="inlineField ? 'outline' : appearance"
[subscriptSizing]="inlineField ? 'dynamic' : subscriptSizing" [subscriptSizing]="inlineField ? 'dynamic' : subscriptSizing"
[class]="additionalClasses"> [class]="additionalClasses">
<mat-label *ngIf="!hideLabel && !inlineField">{{ label | translate }}</mat-label> <mat-label *ngIf="!inlineField">{{ label | translate }}</mat-label>
<input matInput type="text" <input matInput type="text"
#entityInput #entityInput
placeholder="{{ placeholder }}" placeholder="{{ placeholder }}"

8
ui-ngx/src/app/shared/components/entity/entity-autocomplete.component.ts

@ -15,8 +15,6 @@
/// ///
import { import {
AfterViewInit,
booleanAttribute,
Component, Component,
ElementRef, ElementRef,
EventEmitter, EventEmitter,
@ -142,12 +140,6 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit
@coerceBoolean() @coerceBoolean()
allowCreateNew: boolean; allowCreateNew: boolean;
@Input({ transform: booleanAttribute }) hideLabel = false;
@Input({ transform: booleanAttribute }) inlineField = false;
@Input() placeholder: string;
@Input() @Input()
subscriptSizing: SubscriptSizing = 'fixed'; subscriptSizing: SubscriptSizing = 'fixed';

Loading…
Cancel
Save