Select multiple preloaded options are reordered after selecting the input
I have a select multiple that is formFilled with options already attached on a BelongsToMany relationship. As you can see in the attached gif, the options are visible when the form is shown, but when you click the select input the options are rearranged alphabetically. Is there a way to prevent this or to load the options in already sorted so it doesn't jump on the user?
My code:
I've also tried adding
->orderBy('name')
to the formFill query without success. Any ideas?2 Replies