Merge branch 'develop' into feature/AAE-36582-forms-misalignment

This commit is contained in:
Tomasz Nastaly
2025-07-24 23:04:53 +02:00
committed by GitHub
6 changed files with 38 additions and 3 deletions

View File

@@ -1,9 +1,29 @@
@use '../../../../../src/lib/styles/flex' as flex;
.adf-grid-list {
&-section {
&-single-column {
display: flex;
flex-wrap: inherit;
flex-direction: column;
gap: 1%;
@include flex.layout-bp(lt-md) {
flex: 1 1 100% !important;
}
.adf-section-widget {
@include flex.layout-bp(lt-md) {
width: 100% !important;
}
}
> div {
@include flex.layout-bp(lt-md) {
width: 100% !important;
}
}
}
&-column-view-item {

View File

@@ -998,6 +998,21 @@ describe('DropdownCloudWidgetComponent', () => {
expect(widget.dropdownControl.value).toEqual({ id: 'testValue', name: '' });
});
it('should set dropdownControl value when form field value gets changed', () => {
widget.field = {
value: { id: 'Id_1', name: 'Label 1' },
options: [],
isVisible: true,
markAsValid: () => {}
} as FormFieldModel;
spyOn(widget.dropdownControl, 'setValue').and.callThrough();
widget.updateReactiveFormControl();
expect(widget.dropdownControl.setValue).toHaveBeenCalledWith({ id: 'Id_1', name: 'Label 1' }, { emitEvent: false });
expect(widget.dropdownControl.value).toEqual({ id: 'Id_1', name: 'Label 1' });
});
it('should set dropdownControl value without emitting events if is an object', () => {
widget.field = {
value: { id: 'testValueObj', name: 'testValueObjName' },

View File

@@ -137,6 +137,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI
}
updateReactiveFormControl(): void {
this.setFormControlValue();
this.updateFormControlState();
this.handleErrors();
}

View File

@@ -1,7 +1,6 @@
<form>
<mat-form-field
[subscriptSizing]="formFieldSubscriptSizing"
[floatLabel]="'auto'"
class="adf-people-cloud adf-form-field-input"
[class.adf-invalid]="hasError() && isDirty()"
>

View File

@@ -8,7 +8,7 @@
<label class="adf-label" [attr.for]="field.id"
>{{field.name | translate }}<span class="adf-asterisk" [style.visibility]="isRequired() ? 'visible' : 'hidden'">*</span></label
>
<mat-form-field [floatLabel]="field.placeholder ? 'always': null" class="adf-group-widget-field">
<mat-form-field class="adf-group-widget-field">
<mat-chip-grid #chipGrid>
<mat-chip-row
*ngFor="let group of selectedGroups"

View File

@@ -3,7 +3,7 @@
[class.adf-readonly]="field.readOnly"
id="people-widget-content">
<label class="adf-label" [attr.for]="field.id">{{field.name | translate }}<span class="adf-asterisk" [style.visibility]="isRequired() ? 'visible' : 'hidden'">*</span></label>
<mat-form-field [floatLabel]="field.placeholder ? 'always': null"
<mat-form-field
class="adf-people-widget-field">
<mat-chip-grid #chipGrid [attr.aria-label]="'ADF_PROCESS_LIST.START_PROCESS.FORM.LABEL.SELECTED_PEOPLE' | translate">
<mat-chip-row