Skip to content
Snippets Groups Projects
Commit 96fa2f7a authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4527 parameterize subscript sizing

parent 0ece301c
Branches
Tags
No related merge requests found
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
unter der Lizenz sind dem Lizenztext zu entnehmen. unter der Lizenz sind dem Lizenztext zu entnehmen.
--> -->
<mat-form-field subscriptSizing="dynamic" class="compact-input" appearance="{{appearance}}" [floatLabel]="readOnly || autoFocus ? 'always' : 'auto'"> <mat-form-field [subscriptSizing]="subscriptSizing" class="compact-input" appearance="{{appearance}}" [floatLabel]="readOnly || autoFocus ? 'always' : 'auto'">
<mat-label>{{ label }}</mat-label> <mat-label>{{ label }}</mat-label>
<div class="wrapper"> <div class="wrapper">
<input #inputElement <input #inputElement
......
...@@ -75,4 +75,8 @@ describe('TextEditorComponent', () => { ...@@ -75,4 +75,8 @@ describe('TextEditorComponent', () => {
expect(element).toBeInstanceOf(HTMLElement); expect(element).toBeInstanceOf(HTMLElement);
}) })
it('should use fixed subscription sizing by default', () => {
expect(component.subscriptSizing).toBe('fixed');
})
}); });
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; import { AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component'; import { FormControlEditorAbstractComponent } from '../formcontrol-editor.abstract.component';
import { map, Observable, startWith } from 'rxjs'; import { map, Observable, startWith } from 'rxjs';
import { hasContent, isNotEmpty } from '@alfa-client/tech-shared'; import { hasContent } from '@alfa-client/tech-shared';
import { SubscriptSizing } from '@angular/material/form-field';
@Component({ @Component({
selector: 'ozgcloud-text-editor', selector: 'ozgcloud-text-editor',
...@@ -43,6 +44,7 @@ export class TextEditorComponent extends FormControlEditorAbstractComponent impl ...@@ -43,6 +44,7 @@ export class TextEditorComponent extends FormControlEditorAbstractComponent impl
@Input() readOnly: boolean; @Input() readOnly: boolean;
@Input() autoFocus: boolean; @Input() autoFocus: boolean;
@Input() clearable = false; @Input() clearable = false;
@Input() subscriptSizing: SubscriptSizing = 'fixed';
showClearButton$: Observable<boolean>; showClearButton$: Observable<boolean>;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
[autoFocus]="true" [autoFocus]="true"
[clearable]="true" [clearable]="true"
appearance="outline" appearance="outline"
subscriptSizing="dynamic"
[formControlName]="AktenzeichenEditDialogFormservice.AKTENZEICHEN_FIELD"> [formControlName]="AktenzeichenEditDialogFormservice.AKTENZEICHEN_FIELD">
</ozgcloud-text-editor> </ozgcloud-text-editor>
<ozgcloud-paste-text-button <ozgcloud-paste-text-button
......
...@@ -4,11 +4,10 @@ import { AktenzeichenEditDialogData } from './aktenzeichen-edit-dialog.data'; ...@@ -4,11 +4,10 @@ import { AktenzeichenEditDialogData } from './aktenzeichen-edit-dialog.data';
import { AktenzeichenEditDialogFormservice } from './aktenzeichen-edit-dialog.formservice'; import { AktenzeichenEditDialogFormservice } from './aktenzeichen-edit-dialog.formservice';
import { VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared'; import { VorgangService, VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
import { COMMAND_ERROR_MESSAGES, CommandResource, hasError, isSuccessfulDone } from '@alfa-client/command-shared'; import { COMMAND_ERROR_MESSAGES, CommandResource, hasError, isSuccessfulDone } from '@alfa-client/command-shared';
import { createEmptyStateResource, hasContent, isClipboardReadSupported, isNotNull, StateResource } from '@alfa-client/tech-shared'; import { createEmptyStateResource, hasContent, isClipboardReadSupported, StateResource } from '@alfa-client/tech-shared';
import { filter, map, Observable, of, startWith, tap } from 'rxjs'; import { map, Observable, of, startWith, tap } from 'rxjs';
import { SnackBarService } from '@alfa-client/ui'; import { SnackBarService } from '@alfa-client/ui';
import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message'; import { AktenzeichenEditDialogMessages } from './aktenzeichen-edit-dialog.message';
import { trim } from 'lodash-es';
@Component({ @Component({
selector: 'alfa-aktenzeichen-edit-dialog', selector: 'alfa-aktenzeichen-edit-dialog',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment