Browse Source

Approach change

pull/15427/head
Maksym Tsymbarov 6 months ago
parent
commit
a0fd36bc1e
  1. 3
      ui-ngx/src/app/shared/components/entity/entity-list-select.component.html
  2. 2
      ui-ngx/src/app/shared/components/entity/entity-type-select.component.html
  3. 5
      ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts

3
ui-ngx/src/app/shared/components/entity/entity-list-select.component.html

@ -19,10 +19,11 @@
<tb-entity-type-select
[inlineField]="inlineField"
[class.flex-1]="inlineField && !modelValue.entityType"
style="min-width: 175px; padding-right: 8px;"
style="min-width: 100px; padding-right: 8px;"
*ngIf="displayEntityTypeSelect"
[showLabel]="true"
[required]="required"
subscriptSizing="dynamic"
[useAliasEntityTypes]="useAliasEntityTypes"
[allowedEntityTypes]="allowedEntityTypes"
[filterAllowedEntityTypes]="filterAllowedEntityTypes"

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

@ -16,7 +16,7 @@
-->
<mat-form-field [formGroup]="entityTypeFormGroup"
[subscriptSizing]="inlineField ? 'dynamic' : 'fixed'"
[subscriptSizing]="inlineField ? 'dynamic' : subscriptSizing"
[appearance]="inlineField ? 'outline' : appearance">
<mat-label *ngIf="showLabel && !inlineField">{{ label }}</mat-label>
<mat-select [required]="required" formControlName="entityType">

5
ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts

@ -21,7 +21,7 @@ import { AliasEntityType, EntityType, entityTypeTranslations } from '@app/shared
import { EntityService } from '@core/http/entity.service';
import { coerceBoolean } from '@shared/decorators/coercion';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { MatFormFieldAppearance } from '@angular/material/form-field';
import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
@Component({
selector: 'tb-entity-type-select',
@ -69,6 +69,9 @@ export class EntityTypeSelectComponent implements ControlValueAccessor, OnInit,
@Input()
appearance: MatFormFieldAppearance = 'fill';
@Input()
subscriptSizing: SubscriptSizing = 'fixed';
@Input()
@coerceBoolean()
inlineField: boolean;

Loading…
Cancel
Save