It seems that newly added endpoints cannot be sorted until the Edited entity is saved.

Expected behavior:
1.
Add endpoints, sort them amongst the others, and save. Relation Select fields handles add, sort, and save in one operation.

Actual behavior:
1.
Add endpoints, sort them amongst the others, and save. Relation Select field does not save new endpoints.
2.
Add endpoints, sort them amongst themselves or do not sort them, and save. Relation Select fields handles add, new sort, and save in one operation.

Comments

steveoliver’s picture

New fields are unindexed array items, and when pushed in the mix with the integer indexed array, each new row gets overwritten by the existing numeric row.

steveoliver’s picture

Status: Active » Needs review
StatusFileSize
new1.13 KB

This seems to work for me.

reaperdk@boss’s picture

Issue summary: View changes

This path does not work for me.

Canu667’s picture

The attached fix works for me. I partially used the previous patch. Had some problems with adding then removing an element, so I added an additional operation of reindexing the array in Javascript after an element is removed.

steveoliver’s picture