@skyux/data-manager 13.11.0 → 13.11.2

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.
@@ -6,7 +6,7 @@ import * as i2$1 from '@skyux/lists';
6
6
  import { SkyFilterModule, SkySortModule, SkyRepeaterModule, SkyFilterStateService } from '@skyux/lists';
7
7
  import * as i1$2 from '@skyux/modals';
8
8
  import { SkyModalService, SkyModalLegacyService, SkyModalInstance, SkyModalModule } from '@skyux/modals';
9
- import { BehaviorSubject, ReplaySubject, Subject } from 'rxjs';
9
+ import { BehaviorSubject, ReplaySubject, Subject, switchMap } from 'rxjs';
10
10
  import { take, takeUntil, filter, map, distinctUntilChanged } from 'rxjs/operators';
11
11
  import * as i7 from '@skyux/i18n';
12
12
  import { SkyLibResourcesService, SkyI18nModule } from '@skyux/i18n';
@@ -360,17 +360,12 @@ class SkyDataManagerService {
360
360
  }
361
361
  if (settingsKey) {
362
362
  this.getDataStateUpdates(this.#initSource)
363
- .pipe(takeUntil(this.#ngUnsubscribe))
364
- .subscribe((state) => {
365
- this.#uiConfigService
366
- .setConfig(settingsKey, state.getStateOptions())
367
- .pipe(takeUntil(this.#ngUnsubscribe))
368
- .subscribe(
369
- // eslint-disable-next-line @typescript-eslint/no-empty-function
370
- () => { }, (err) => {
363
+ .pipe(takeUntil(this.#ngUnsubscribe), switchMap((state) => this.#uiConfigService.setConfig(settingsKey, state.getStateOptions())))
364
+ .subscribe({
365
+ error: (err) => {
371
366
  console.warn('Could not save data manager settings.');
372
367
  console.warn(err);
373
- });
368
+ },
374
369
  });
375
370
  }
376
371
  }
@@ -392,7 +387,7 @@ class SkyDataManagerService {
392
387
  this.#activeViewId.next(id);
393
388
  });
394
389
  this.#dataStateChange
395
- .pipe(take(1))
390
+ .pipe(takeUntil(this.#ngUnsubscribe), take(1))
396
391
  .subscribe((change) => {
397
392
  const dataState = change.dataState;
398
393
  const currentViewState = dataState.getViewStateById(viewConfig.id);