UiL-OTS-labs / web-experiment-datastore

Other
0 stars 0 forks source link

Weird order of groups when adding multiple groups. #64

Closed maartenuni closed 2 years ago

maartenuni commented 2 years ago

When adding multiple groups to an experiment, the first group stays in place (maybe because it is saved), the second group is added when, so far so good. However, when a third group is added, the second group is moved to the third place and an empty group is inserted between the saved groups and the previously added groups. This is weird to the users, because they would expect the group to be added at the bottom and not in the middle. The strange behavior occurs after clicking the "+ Add target group" link, but prior to clicking save

tymees commented 2 years ago

Does this happen after save actions? In which case, it might just be that TargetGroup doesn't have a default order_by.

It then would just do a quasi random order

maartenuni commented 2 years ago

No, this happens prior to saving, probably, the javascript on the page needs a little update.

bbonf commented 2 years ago

Tiny PR. Not sure why I used last() to begin with...