Fix ordering issues by using regular arrays instead of associative arrays. Existing code should work as is, thanks to PHP handling both kinds of arrays the same way.
This is a proposition of fix that highlights a problem: There's an issue with sorting.
Sorting is always correct when done in the create/edit view. But once saved and reloaded, the items were sorted by UUID (i.e. by array keys) instead of keeping their manually attributed order.
My guess is that since JSON objects are unordered sets of name/value pairs, there's no guarantee it'll keep ordering across systems (e.g. PHP-level serde, DB-level serde)
Fix ordering issues by using regular arrays instead of associative arrays. Existing code should work as is, thanks to PHP handling both kinds of arrays the same way.
This is a proposition of fix that highlights a problem: There's an issue with sorting.
Sorting is always correct when done in the create/edit view. But once saved and reloaded, the items were sorted by UUID (i.e. by array keys) instead of keeping their manually attributed order.