Skip to content
Snippets Groups Projects
Commit 7a39ecc4 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6497 add isResizable as attribute to textarea-editor

parent 2a9cfc30
No related branches found
No related tags found
No related merge requests found
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
@import 'libs/design-system/src/lib/tailwind-preset/root.css'; @import 'libs/design-system/src/lib/tailwind-preset/root.css';
@import 'libs/ui/src/lib/font/font_material'; @import 'libs/ui/src/lib/font/font_material';
@import 'libs/admin/settings/src/lib/postfach/postfach-container/postfach-form/postfach-signatur/postfach-signatur.component.theme.scss';
@include mat.all-component-typographies(); @include mat.all-component-typographies();
@include mat.core(); @include mat.core();
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
</p> </p>
<ods-textarea-editor <ods-textarea-editor
[formControlName]="formServiceClass.SIGNATUR_FIELD" [formControlName]="formServiceClass.SIGNATUR_FIELD"
[isResizable]="false"
data-test-id="signatur-text" data-test-id="signatur-text"
label="" label=""
rows="6" rows="6"
......
postfach-signatur {
textarea {
resize: none !important;
}
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
[attr.data-test-id]="(label | convertForDataTest) + '-textarea-editor'" [attr.data-test-id]="(label | convertForDataTest) + '-textarea-editor'"
[required]="isRequired" [required]="isRequired"
[focus]="focus" [focus]="focus"
[isResizable]="isResizable"
> >
<ods-validation-error <ods-validation-error
error error
......
...@@ -24,6 +24,7 @@ export class TextareaEditorComponent extends FormControlEditorAbstractComponent ...@@ -24,6 +24,7 @@ export class TextareaEditorComponent extends FormControlEditorAbstractComponent
@Input() rows: number = 10; @Input() rows: number = 10;
@Input() isRequired: boolean = false; @Input() isRequired: boolean = false;
@Input() focus: boolean = false; @Input() focus: boolean = false;
@Input() isResizable: boolean = true;
get variant(): string { get variant(): string {
return this.invalidParams.length > 0 ? 'error' : 'default'; return this.invalidParams.length > 0 ? 'error' : 'default';
......
...@@ -38,7 +38,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>; ...@@ -38,7 +38,7 @@ type TextareaVariants = VariantProps<typeof textareaVariants>;
[id]="id" [id]="id"
[formControl]="fieldControl" [formControl]="fieldControl"
[rows]="rows" [rows]="rows"
[ngClass]="textareaVariants({ variant })" [ngClass]="[textareaVariants({ variant }), isResizable ? 'resize' : 'resize-none']"
[placeholder]="placeholder" [placeholder]="placeholder"
[autocomplete]="autocomplete" [autocomplete]="autocomplete"
[attr.aria-required]="required" [attr.aria-required]="required"
...@@ -64,6 +64,7 @@ export class TextareaComponent { ...@@ -64,6 +64,7 @@ export class TextareaComponent {
@Input() variant: TextareaVariants['variant']; @Input() variant: TextareaVariants['variant'];
@Input() fieldControl: FormControl = new FormControl(EMPTY_STRING); @Input() fieldControl: FormControl = new FormControl(EMPTY_STRING);
@Input() required: boolean = false; @Input() required: boolean = false;
@Input() isResizable: boolean = true;
@Input() set focus(value: boolean) { @Input() set focus(value: boolean) {
if (value && this.textAreaElement) { if (value && this.textAreaElement) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment