@sumaris-net/ngx-components 2.4.25-rc2 → 2.4.25-rc3

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.
@@ -11163,9 +11163,11 @@ class Entity {
11163
11163
  const target = Object.assign({}, this); //= {...this};
11164
11164
  if (!opts || opts.keepTypename !== true)
11165
11165
  delete target.__typename;
11166
- if (target.id == null || (opts && opts.keepLocalId === false && target.id < 0))
11167
- delete target.id;
11168
11166
  target.updateDate = toDateISOString(this.updateDate);
11167
+ if (target.id == null || (opts && opts.keepLocalId === false && target.id < 0)) {
11168
+ delete target.id;
11169
+ delete target.updateDate; // Make to sens to keep updateDate of a local entity to save
11170
+ }
11169
11171
  return target;
11170
11172
  }
11171
11173
  fromObject(source, opts) {
@@ -28249,7 +28251,7 @@ class AppEntityEditor extends AppTabEditor {
28249
28251
  ? firstFalse(this.savingSubject).pipe(mapTo(data), debounceTime(500))
28250
28252
  : of(data)))
28251
28253
  .subscribe((data) => {
28252
- const isNewer = isMoment(data.updateDate) && data.updateDate.isAfter(this.data.updateDate);
28254
+ const isNewer = isMoment(data.updateDate) && (!this.data.updateDate || data.updateDate.isAfter(this.data.updateDate));
28253
28255
  if (!isNewer)
28254
28256
  return; // Skip
28255
28257
  // Editor has no changes: reload