mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix missing check for sort field (#19412)
Co-authored-by: Daniel Biegler <DanielBiegler@users.noreply.github.com> Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
This commit is contained in:
5
.changeset/modern-turkeys-hang.md
Normal file
5
.changeset/modern-turkeys-hang.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@directus/app": patch
|
||||
---
|
||||
|
||||
Fixed saving/updating in Kanban-Layout with missing Sort-Field
|
||||
@@ -279,7 +279,7 @@ export default defineLayout<LayoutOptions, LayoutQuery>({
|
||||
const before = group.items[event.added.newIndex - 1] as Item | undefined;
|
||||
const after = group.items[event.added.newIndex] as Item | undefined;
|
||||
|
||||
if (item.sort !== undefined) {
|
||||
if (item.sort !== undefined && sortField.value) {
|
||||
if (after?.sort !== undefined && after.sort < item.sort) {
|
||||
await changeManualSort({ item: item.id, to: after.id });
|
||||
} else if (before?.sort !== undefined && before.sort > item.sort) {
|
||||
|
||||
Reference in New Issue
Block a user