FEAT #12622 TIME 0:10 clean m2m fields on change values + docker

parent 3a24554b
......@@ -8,7 +8,7 @@ set -xe
apt-get install -y libpq-dev libxml2-dev libxslt1-dev libpng-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-configure pdo_pgsql --with-pdo-pgsql \
&& docker-php-ext-install pdo_pgsql pgsql > /dev/null 2>&1 \
&& docker-php-ext-install pdo_pgsql pgsql \
&& docker-php-ext-install xsl \
&& pecl install xdebug-2.7.0RC2 \
&& docker-php-ext-enable xdebug \
......
......@@ -167,7 +167,7 @@
<mat-form-field>
<input type="text" #autoCompleteInputCommunicationMean [placeholder]="lang.searchCommunicationMean"
matInput [formControl]="field.control" [matAutocomplete]="auto"
(click)="$event.stopPropagation()">
(click)="$event.stopPropagation()" (keyup)="resetM2MFields()">
<mat-hint *ngIf="!isEmptyValue(field.desc)" align="end" [innerHTML]="field.desc"></mat-hint>
<mat-autocomplete #auto="matAutocomplete"
(optionSelected)="selectCommunicationMean($event)">
......@@ -192,7 +192,7 @@
<mat-form-field>
<input type="text" #autoCompleteInputExternalIdM2M [placeholder]="lang.searchExternalIdM2M"
matInput [formControl]="field.control" [matAutocomplete]="auto"
(click)="$event.stopPropagation()" (focus)="resetAutocompleteExternalIdM2M()">
(click)="$event.stopPropagation()" (keyup)="resetAutocompleteExternalIdM2M()">
<mat-hint *ngIf="!isEmptyValue(field.desc)" align="end" [innerHTML]="field.desc"></mat-hint>
<mat-autocomplete #auto="matAutocomplete"
(optionSelected)="selectExternalIdM2M($event)">
......
......@@ -837,6 +837,13 @@ export class ContactsFormComponent implements OnInit {
}
}
resetM2MFields() {
let indexFieldAnnuaryId = -1;
indexFieldAnnuaryId = this.contactForm.map(field => field.id).indexOf('externalId_m2m');
this.contactForm[indexFieldAnnuaryId].control.setValue('');
this.resetAutocompleteExternalIdM2M();
}
initAutocompleteAddressBan() {
this.addressBANInfo = this.lang.autocompleteInfo;
this.addressBANResult = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment