chrv-components 1.10.21 → 1.10.22

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
@@ -1281,9 +1281,7 @@ class ChrTagSelectComponent extends ChrBaseInputComponent {
1281
1281
  const res = this.editCallback(entry, this.editSubject);
1282
1282
  //If the callback returns null, we remove the value.
1283
1283
  if (res === null && this.value !== null) {
1284
- this.value = this.value?.filter((v) => v != entry);
1285
- this.removeCallback?.(entry);
1286
- return this.onValueChange(this.value);
1284
+ this.remove(entry);
1287
1285
  }
1288
1286
  //If the callback returns a different value (different by reference (ex: different object)), we replace the edited entry by the returned entry.
1289
1287
  // if (entry != res) {
@@ -1363,12 +1361,8 @@ class ChrTagSelectComponent extends ChrBaseInputComponent {
1363
1361
  });
1364
1362
  this.editSubject.subscribe((entry) => {
1365
1363
  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);
1369
1364
  this.value[index] = entry;
1370
1365
  this.value = [...(this.value ?? [])];
1371
- console.log(`[TagSelect] New Value:`, this.value);
1372
1366
  return this.onValueChange(this.value);
1373
1367
  });
1374
1368
  }
@@ -2193,7 +2187,7 @@ class ChrFormComponent {
2193
2187
  if (Object.hasOwn(this.model, control.name)) {
2194
2188
  this.model[control.name] = value;
2195
2189
  //Dispatch the whole model change event
2196
- this.modelChange.emit({ ...this.model });
2190
+ this.modelChange.emit(this.model);
2197
2191
  }
2198
2192
  // Whether or not there is a matching property in the model, we update the local values
2199
2193
  this.values[control.name] = value;