@decaf-ts/for-angular 0.1.51 → 0.1.52

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.
@@ -12409,16 +12409,27 @@ let ListComponent = class ListComponent extends NgxComponentDirective {
12409
12409
  * @summary Filters out an item with the specified ID from the data array and
12410
12410
  * refreshes the list display. This is typically used after a delete operation.
12411
12411
  *
12412
- * @param {string} uid - The ID of the item to delete
12412
+ * @param {string} modelId - The ID of the item to delete
12413
12413
  * @param {string} pk - The primary key field name
12414
12414
  * @returns {Promise<void>}
12415
12415
  *
12416
12416
  * @memberOf ListComponent
12417
12417
  */
12418
- handleDelete(uid, pk) {
12419
- if (!pk)
12418
+ handleDelete(modelId, pk) {
12419
+ if (!pk) {
12420
12420
  pk = this.pk;
12421
- this.items = [...(this.data?.filter((item) => item['uid'] !== uid) || [])];
12421
+ }
12422
+ this.items = [
12423
+ ...(this.data?.filter(({ uid }) => {
12424
+ if (typeof uid === Primitives.STRING) {
12425
+ return uid !== modelId;
12426
+ }
12427
+ else {
12428
+ const { value } = uid;
12429
+ return value !== modelId;
12430
+ }
12431
+ }) || []),
12432
+ ];
12422
12433
  this.data = [...this.items];
12423
12434
  if (!this.data.length) {
12424
12435
  this.searchValue = undefined;