chrv-components 1.10.19 → 1.10.21

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.
Binary file
@@ -1270,9 +1270,6 @@ class ChrTagSelectComponent extends ChrBaseInputComponent {
1270
1270
  this.textInputValue = '';
1271
1271
  return;
1272
1272
  }
1273
- if (!this.value?.find((v) => v == value)) {
1274
- this.value = [...(this.value ?? []), value];
1275
- }
1276
1273
  this.textInputValue = '';
1277
1274
  this.addSubject.next(value);
1278
1275
  };
@@ -1359,13 +1356,19 @@ class ChrTagSelectComponent extends ChrBaseInputComponent {
1359
1356
  this.acceptText = this.display === null && this.data === null;
1360
1357
  //Register subject listeners
1361
1358
  this.addSubject.subscribe((entry) => {
1362
- this.value = [...(this.value ?? []), entry];
1363
- this.onValueChange(this.value);
1359
+ if (!this.value?.find((v) => v == entry)) {
1360
+ this.value = [...(this.value ?? []), entry];
1361
+ this.onValueChange(this.value);
1362
+ }
1364
1363
  });
1365
1364
  this.editSubject.subscribe((entry) => {
1366
1365
  const index = this.value?.indexOf(entry);
1366
+ console.log(`[TagSelect] HasFoundIndex:`, index);
1367
+ console.log(`[TagSelect] Of:`, entry);
1368
+ console.log(`[TagSelect] In:`, this.value);
1367
1369
  this.value[index] = entry;
1368
1370
  this.value = [...(this.value ?? [])];
1371
+ console.log(`[TagSelect] New Value:`, this.value);
1369
1372
  return this.onValueChange(this.value);
1370
1373
  });
1371
1374
  }