mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-04-23 22:30:37 +00:00
Merge branch 'develop' into feature/AAE-36582-forms-misalignment
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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' },
|
||||
|
||||
@@ -137,6 +137,7 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI
|
||||
}
|
||||
|
||||
updateReactiveFormControl(): void {
|
||||
this.setFormControlValue();
|
||||
this.updateFormControlState();
|
||||
this.handleErrors();
|
||||
}
|
||||
|
||||
@@ -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()"
|
||||
>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user