@quadrel-enterprise-ui/framework 19.3.3 → 19.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12366,11 +12366,14 @@ class QdMultiInputService {
12366
12366
  return;
12367
12367
  }
12368
12368
  const selected = [];
12369
- items.forEach(i => {
12370
- this._optionsListSubject.value.forEach(opt => {
12371
- if (opt.value === i)
12372
- selected.push(opt);
12373
- });
12369
+ items.forEach(item => {
12370
+ const foundOption = this._optionsListSubject.value.find(opt => opt.value === item);
12371
+ if (foundOption) {
12372
+ selected.push(foundOption);
12373
+ }
12374
+ else {
12375
+ selected.push({ i18n: item, value: item, disabled: false });
12376
+ }
12374
12377
  });
12375
12378
  this._selectedItemsSubject.next(selected);
12376
12379
  }
@@ -13499,8 +13502,7 @@ class QdMultiInputComponent {
13499
13502
  return this.getItemsArray();
13500
13503
  }
13501
13504
  getValues() {
13502
- const values = this.getItemsArray().map(i => this.multiInputService.findOption(i.value));
13503
- return values;
13505
+ return this.multiInputService.getItems();
13504
13506
  }
13505
13507
  handleChipClick($event) {
13506
13508
  $event.stopPropagation();
@@ -13533,9 +13535,11 @@ class QdMultiInputComponent {
13533
13535
  if (!option || !this.optionsListForView.map(options => options.value).includes(option.value)) {
13534
13536
  if (this.inputField.nativeElement.value === '')
13535
13537
  return;
13538
+ // On Enter non-existing Option
13536
13539
  this.handleUserInput();
13537
13540
  }
13538
13541
  else {
13542
+ // On Enter existing suggested Option
13539
13543
  this.addItem(option);
13540
13544
  }
13541
13545
  }
@@ -13556,7 +13560,6 @@ class QdMultiInputComponent {
13556
13560
  if (this.formArray) {
13557
13561
  items.forEach(item => {
13558
13562
  this.formArray.push(item.value);
13559
- this.multiInputService.addSelectedItem(item);
13560
13563
  });
13561
13564
  this.filterOptions = '';
13562
13565
  this.changeValue();