@eeacms/volto-clms-theme 1.1.296 → 1.1.297
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,11 @@ 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.297](https://github.com/eea/volto-clms-theme/compare/1.1.296...1.1.297) - 17 June 2026
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Refs #297796 - Keep datasets as sorted in edit form - related datasets field. [GhitaB - [`88f5d90`](https://github.com/eea/volto-clms-theme/commit/88f5d90b6e24b010e96d0076dcbaaf29ae8547e4)]
|
|
7
12
|
### [1.1.296](https://github.com/eea/volto-clms-theme/compare/1.1.295...1.1.296) - 16 June 2026
|
|
8
13
|
|
|
9
14
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -87,7 +87,11 @@ const CclRelatedListingView = (props) => {
|
|
|
87
87
|
} else if (data.content_type === 'UseCase') {
|
|
88
88
|
sort_on = 'sortable_title';
|
|
89
89
|
sort_order = 'ascending';
|
|
90
|
+
} else if (data.content_type === 'DataSet') {
|
|
91
|
+
sort_on = undefined;
|
|
92
|
+
sort_order = undefined;
|
|
90
93
|
}
|
|
94
|
+
|
|
91
95
|
const ref = React.useRef();
|
|
92
96
|
|
|
93
97
|
const handleScroll = (ref) => {
|
|
@@ -95,27 +99,24 @@ const CclRelatedListingView = (props) => {
|
|
|
95
99
|
};
|
|
96
100
|
|
|
97
101
|
React.useEffect(() => {
|
|
102
|
+
const searchParams = {
|
|
103
|
+
portal_type: data.content_type || 'News Item',
|
|
104
|
+
...associated,
|
|
105
|
+
...(data.content_type === 'TechnicalLibrary'
|
|
106
|
+
? { fullobjects: 1 }
|
|
107
|
+
: { metadata_fields: '_all' }),
|
|
108
|
+
...(sort_on ? { sort_on } : {}),
|
|
109
|
+
...(sort_order ? { sort_order } : {}),
|
|
110
|
+
b_size: 99999,
|
|
111
|
+
};
|
|
112
|
+
|
|
98
113
|
uid &&
|
|
99
114
|
id &&
|
|
100
115
|
!searchSubrequests?.loading &&
|
|
101
116
|
!sLoaded &&
|
|
102
117
|
!searchSubrequests?.error &&
|
|
103
|
-
dispatch(
|
|
104
|
-
|
|
105
|
-
'/',
|
|
106
|
-
{
|
|
107
|
-
portal_type: data.content_type || 'News Item',
|
|
108
|
-
...associated,
|
|
109
|
-
...(data.content_type === 'TechnicalLibrary'
|
|
110
|
-
? { fullobjects: 1 }
|
|
111
|
-
: { metadata_fields: '_all' }),
|
|
112
|
-
sort_on: sort_on,
|
|
113
|
-
sort_order: sort_order,
|
|
114
|
-
b_size: 99999,
|
|
115
|
-
},
|
|
116
|
-
`${id}-${uid}`,
|
|
117
|
-
),
|
|
118
|
-
);
|
|
118
|
+
dispatch(searchContent('/', searchParams, `${id}-${uid}`));
|
|
119
|
+
|
|
119
120
|
return () => {};
|
|
120
121
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
121
122
|
}, [data, id, uid, dispatch]);
|
|
@@ -152,6 +153,24 @@ const CclRelatedListingView = (props) => {
|
|
|
152
153
|
p_functions.setOriginalDataList([...libraries]);
|
|
153
154
|
p_functions.setDataList([...libraries]);
|
|
154
155
|
}
|
|
156
|
+
} else if (
|
|
157
|
+
data.content_type === 'DataSet' &&
|
|
158
|
+
Array.isArray(directQuery?.UID)
|
|
159
|
+
) {
|
|
160
|
+
const orderMap = new Map(
|
|
161
|
+
directQuery.UID.map((item, index) => [item, index]),
|
|
162
|
+
);
|
|
163
|
+
const sorted = [...libraries].sort((a, b) => {
|
|
164
|
+
const ai = orderMap.get(a.UID) ?? Infinity;
|
|
165
|
+
const bi = orderMap.get(b.UID) ?? Infinity;
|
|
166
|
+
if (ai === bi) return 0;
|
|
167
|
+
return ai - bi;
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
if (sLoaded) {
|
|
171
|
+
p_functions.setOriginalDataList([...sorted]);
|
|
172
|
+
p_functions.setDataList([...sorted]);
|
|
173
|
+
}
|
|
155
174
|
} else {
|
|
156
175
|
if (sLoaded) {
|
|
157
176
|
p_functions.setOriginalDataList([...libraries]);
|