@retikolo/drag-drop-content-types 1.3.7 → 1.3.10

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.
@@ -177,7 +177,8 @@ const SortModal = () => {
177
177
  const showMenu = () => {
178
178
 
179
179
  const SortableItem = SortableElement(({ value }) => (
180
- <MenuItem style={{ zIndex: 10, cursor: "all-scroll" }}>
180
+ <MenuItem style={{ zIndex: 10, cursor: "all-scroll", userSelect: "none" }}
181
+ onSelect={(e) => { e.preventDefault() }}>
181
182
  <div
182
183
  style={{
183
184
  overflowX: "hidden",
@@ -187,8 +188,8 @@ const SortModal = () => {
187
188
  >
188
189
  <Icon height={"0.6em"} as={Drag} />
189
190
  &nbsp;
190
- <span title={value[settings.title] ? value[settings.title] : value[mainField] }>
191
- {value[settings.title] ? value[settings.title] : value[mainField] }
191
+ <span title={value[settings.title] ? value[settings.title] : value[mainField]}>
192
+ {value[settings.title] ? value[settings.title] : value[mainField]}
192
193
  </span>
193
194
  </div>
194
195
  </MenuItem>
@@ -221,10 +222,11 @@ const SortModal = () => {
221
222
  status == 'success' ?
222
223
  <>
223
224
  <SimpleMenu
224
- as={IconButton}
225
- icon={<Layer />}
226
- label="Sort via drag and drop"
227
- onClick={() => {
225
+ label="Sort"
226
+ //as={IconButton}
227
+ //icon={<Layer />}
228
+ //aria-label="Sort via drag and drop"
229
+ onOpen={() => {
228
230
  fetchContentType();
229
231
  }}
230
232
  >
@@ -253,7 +255,7 @@ const SortModal = () => {
253
255
 
254
256
  // Update menu when loading more elements
255
257
  useEffect(() => {
256
- if (settings){
258
+ if (settings) {
257
259
  fetchContentType();
258
260
  }
259
261
  }, [noEntriesFromNextPage])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retikolo/drag-drop-content-types",
3
- "version": "1.3.7",
3
+ "version": "1.3.10",
4
4
  "description": "This plugin add a drag and droppable list that allows you to sort content type entries.",
5
5
  "strapi": {
6
6
  "name": "drag-drop-content-types",