@retikolo/drag-drop-content-types 1.3.3 → 1.3.5
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.
|
@@ -207,6 +207,7 @@ const SortModal = () => {
|
|
|
207
207
|
<SimpleMenu
|
|
208
208
|
as={IconButton}
|
|
209
209
|
icon={<Layer />}
|
|
210
|
+
label="Sort via drag and drop"
|
|
210
211
|
onClick={() => {
|
|
211
212
|
fetchContentType();
|
|
212
213
|
}}
|
|
@@ -231,7 +232,9 @@ const SortModal = () => {
|
|
|
231
232
|
|
|
232
233
|
// Update menu when loading more elements
|
|
233
234
|
useEffect(() => {
|
|
234
|
-
|
|
235
|
+
if (settings){
|
|
236
|
+
fetchContentType();
|
|
237
|
+
}
|
|
235
238
|
}, [noEntriesFromNextPage])
|
|
236
239
|
|
|
237
240
|
// Sync entries in sort menu to match current page of ListView when content-manager page changes
|
package/package.json
CHANGED
|
@@ -50,7 +50,11 @@ async function index(contentType, start, limit, locale, rankFieldName) {
|
|
|
50
50
|
locale: locale,
|
|
51
51
|
}
|
|
52
52
|
indexData.sort[rankFieldName] = 'asc'
|
|
53
|
-
|
|
53
|
+
try {
|
|
54
|
+
return await strapi.entityService.findMany(contentType, indexData );
|
|
55
|
+
} catch (err) {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
// Update rank of specified content type
|