Closed AndyBoot closed 10 months ago
When you say "pull in the selected items via code" are you meaning just accessing the property on the doc type that returns the selected entities?
Yes correct, i.e.
So in this example, Features
is the property with the entity picker. So if the custom table had features 1 - 10 in that order, and I only selected features 7, 3, 9, & 1 then what instead gets returned is 1, 3, 7 & 9 when I'd imagine what we should get is the same order in which they were selected.
Ok, so I've pushed a preview release to https://nuget.outfield.digital/unstable/v3/index.json so if you want to grab the latest 1.6.7 beta I think this should fix it.
Amazing! Yeah that appears to have done the trick. Thanks Matt!
Resolved in 10.0.1 and 12.0.1 of UI Builder (also in Konstrukt 1.6.7)
Describe the bug When using the entity picker against a doc type property, selecting the entities and pulling through the IEnumerable of entities in code, it isn't giving us a list of entities in the same order as per how they are selected in the content management section of the backoffice. It appears they're just being brought through as per their default order in the custom table.
Looking in the umbracoPropertyData table, it appears the property value is being stored as an integer comma-delimeted array, and in the correct order.
I've managed to work around this for the time being with some dirty code to look up the raw int array in the umbracoPropertyData table and reordering the IEnumerable based on the order of the Id's within the array. Ideally, I shouldn't need to do this.
Steps To Reproduce Steps to reproduce the behavior:
IEnumerable<entity>
object, loop through the selected items to be shown the items in the wrong order from how they were selectedExpected behavior The
IEnumerable<entity>
should match the order of the integer comma-delimeted array.Environment (please complete the following information):