@eeacms/volto-clms-theme 1.1.269 → 1.1.270

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [1.1.270](https://github.com/eea/volto-clms-theme/compare/1.1.269...1.1.270) - 28 January 2026
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: technical documents order not working on certain products -refs #295616 [ana-oprea - [`e9247ab`](https://github.com/eea/volto-clms-theme/commit/e9247ab65c2a15b9b3994e4ca8733d5ec62d623d)]
12
+
7
13
  ### [1.1.269](https://github.com/eea/volto-clms-theme/compare/1.1.268...1.1.269) - 20 January 2026
8
14
 
9
15
  ### [1.1.268](https://github.com/eea/volto-clms-theme/compare/1.1.267...1.1.268) - 19 January 2026
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.269",
3
+ "version": "1.1.270",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -35,6 +35,7 @@ const CclRelatedListingView = (props) => {
35
35
  const { pagination, currentPage, paginationSize, dataList } = p_data;
36
36
 
37
37
  const dispatch = useDispatch();
38
+ const content = useSelector((state) => state.content.data);
38
39
  const uid = metadata ? metadata['UID'] : properties['UID'];
39
40
  const allSearchSubrequests = useSelector((state) => state.search.subrequests);
40
41
  const searchSubrequests = allSearchSubrequests?.[`${id}-${uid}`];
@@ -120,11 +121,12 @@ const CclRelatedListingView = (props) => {
120
121
  React.useEffect(() => {
121
122
  // this is to avoid unnecesarry calls when the libraries for the related datasets are loaded
122
123
  if (data.content_type === 'TechnicalLibrary') {
123
- if (sLoaded && properties?.technical_documents_order) {
124
+ const technicalDocumentsOrder = content?.technical_documents_order;
125
+ if (sLoaded && technicalDocumentsOrder) {
124
126
  // orderMap of the technical_documents_order
125
127
  // if the UID is not present in the orderMap, we use the id (backward compatibility)
126
128
  const orderMap = new Map(
127
- properties?.technical_documents_order.items?.map((item, index) => {
129
+ technicalDocumentsOrder.items?.map((item, index) => {
128
130
  return item?.UID ? [item.UID, index] : [item.id, index];
129
131
  }) || [],
130
132
  );
@@ -144,7 +146,7 @@ const CclRelatedListingView = (props) => {
144
146
  p_functions.setOriginalDataList([...sorted]);
145
147
  p_functions.setDataList([...sorted]);
146
148
  }
147
- if (sLoaded && !properties?.technical_documents_order) {
149
+ if (sLoaded && !technicalDocumentsOrder) {
148
150
  p_functions.setOriginalDataList([...libraries]);
149
151
  p_functions.setDataList([...libraries]);
150
152
  }
@@ -155,7 +157,7 @@ const CclRelatedListingView = (props) => {
155
157
  }
156
158
  }
157
159
  // eslint-disable-next-line react-hooks/exhaustive-deps
158
- }, [sLoaded, properties.technical_documents_order, libraries]);
160
+ }, [sLoaded, content?.technical_documents_order, libraries]);
159
161
 
160
162
  return (
161
163
  <>