wt-front-shared 1.0.60 → 1.0.62

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.
@@ -6027,11 +6027,11 @@ const _staticDataReducer$2 = createReducer(initialState$3, on(StaticDataGetList,
6027
6027
  if (!newsState['list'][staticDataType]) {
6028
6028
  newsState['list'][staticDataType] = { [storeSubSection]: {} };
6029
6029
  }
6030
- if (!keepState) {
6031
- newsState['list'][staticDataType][storeSubSection] = Array.isArray(data) ? [...data] : [];
6030
+ if (keepState && state.list[staticDataType]?.[storeSubSection]) {
6031
+ newsState['list'][staticDataType][storeSubSection] = Array.isArray(data) ? [...state.list[staticDataType][storeSubSection], ...data] : [];
6032
6032
  }
6033
6033
  else {
6034
- newsState['list'][staticDataType][storeSubSection] = Array.isArray(data) ? [...state.list[staticDataType][storeSubSection], ...data] : [];
6034
+ newsState['list'][staticDataType][storeSubSection] = Array.isArray(data) ? [...data] : [];
6035
6035
  }
6036
6036
  newsState['meta'][staticDataType] = {
6037
6037
  ...newsState['meta']?.[staticDataType],
@@ -6905,7 +6905,7 @@ class StaticDataFacade {
6905
6905
  return this.store.pipe(select(staticDataQuery.getStaticDataItem(contentType, subSection, itemIdOrSlug)));
6906
6906
  }
6907
6907
  loadStaticData(contentType, params, subSection = 'list') {
6908
- const { where, fields, paging, sort, forPanel, search } = params;
6908
+ const { where, fields, paging, sort, forPanel, search, keepState } = params;
6909
6909
  this.store.dispatch(StaticDataGetList({
6910
6910
  payload: {
6911
6911
  contentType,
@@ -6915,7 +6915,8 @@ class StaticDataFacade {
6915
6915
  paging,
6916
6916
  sort,
6917
6917
  forPanel,
6918
- search
6918
+ search,
6919
+ keepState
6919
6920
  }
6920
6921
  }));
6921
6922
  }