Ticket 8390: Remove separator key codes in the default multiple auto complete input and added in invitation-dialog.

This commit is contained in:
Konstantinos Triantafyllou 2023-02-23 13:01:56 +02:00
parent 806ce4f584
commit 4c7dee3ece
3 changed files with 5 additions and 4 deletions

View File

@ -43,6 +43,9 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
} }
private _configuration: MultipleAutoCompleteConfiguration; private _configuration: MultipleAutoCompleteConfiguration;
@Input()
separatorKeysCodes = [];
// Selected Option Event // Selected Option Event
@Output() optionSelected: EventEmitter<any> = new EventEmitter(); @Output() optionSelected: EventEmitter<any> = new EventEmitter();
@Output() optionRemoved: EventEmitter<any> = new EventEmitter(); @Output() optionRemoved: EventEmitter<any> = new EventEmitter();
@ -69,7 +72,6 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
_groupedItems: Observable<AutoCompleteGroup[]>; _groupedItems: Observable<AutoCompleteGroup[]>;
selectable = false; selectable = false;
removable = true; removable = true;
separatorKeysCodes = [ENTER, COMMA];
get empty() { return (!this.value || this.value.length === 0) && (!this.inputValue || this.inputValue.length === 0); } get empty() { return (!this.value || this.value.length === 0) && (!this.inputValue || this.inputValue.length === 0); }
@ -377,7 +379,7 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp
//Chip Functions //Chip Functions
_addItem(event: MatChipInputEvent): void { _addItem(event: MatChipInputEvent): void {
console.log(this._items)
const input = event.input; const input = event.input;
const value = event.value; const value = event.value;
// Add our fruit // Add our fruit

View File

@ -10,7 +10,7 @@
<mat-form-field class="col pt-0 pb-2 mb-4 search"> <mat-form-field class="col pt-0 pb-2 mb-4 search">
<!-- <mat-label>{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}</mat-label> --> <!-- <mat-label>{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}</mat-label> -->
<app-multiple-auto-complete [formControl]="formGroup.get('users')" placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}" <app-multiple-auto-complete [formControl]="formGroup.get('users')" placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
[configuration]="usersAutoCompleteConfiguration" [showNoResultsLabel]="false" [configuration]="usersAutoCompleteConfiguration" [showNoResultsLabel]="false" [separatorKeysCodes]="separatorKeysCodes"
[minLength]="3"> [minLength]="3">
</app-multiple-auto-complete> </app-multiple-auto-complete>
</mat-form-field> </mat-form-field>

View File

@ -32,7 +32,6 @@ export class DmpInvitationDialogComponent extends BaseComponent implements OnIni
public filteredUsers: DmpInvitationUser[]; public filteredUsers: DmpInvitationUser[];
public emails: string[] = []; public emails: string[] = [];
public roles = Role; public roles = Role;
visible = true; visible = true;
selectable = true; selectable = true;
removable = true; removable = true;