Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort order not updated #11

Open
JamesDPC opened this issue Jul 23, 2024 · 1 comment
Open

Sort order not updated #11

JamesDPC opened this issue Jul 23, 2024 · 1 comment
Assignees

Comments

@JamesDPC
Copy link
Contributor

It's possible for the sort order to not be update-able after an element is moved.
There is some funkiness in the way the base elemental UI tells the backend what sort value to use.

In this example Element 2 (with a sort value of 1) was moved into the area containing element 1 and 3:

+----+----------+-----------+------+
| ID | ParentID | Title     | Sort |
+----+----------+-----------+------+
|  9 |       62 | Element 1 |    1 |
| 15 |       62 | Element 2 |    1 |
| 16 |       62 | Element 3 |    2 |
+----+----------+-----------+------+

It's only possible to re-order Element 3 in the UI and have that retained, with these sort values resulting:

+----+----------+-----------+------+
| ID | ParentID | Title     | Sort |
+----+----------+-----------+------+
| 16 |       62 | Element 3 |    1 |
|  9 |       62 | Element 1 |    2 |
| 15 |       62 | Element 2 |    2 |
+----+----------+-----------+------+
@JamesDPC
Copy link
Contributor Author

Possibly similar to silverstripe/silverstripe-elemental#1046

@JamesDPC JamesDPC self-assigned this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant