activeadmin-searchable_select icon indicating copy to clipboard operation
activeadmin-searchable_select copied to clipboard

Multiple Select Order

Open Adeynack opened this issue 2 years ago • 2 comments

The order in multiple selects is not kept. It always re-orders in alphabetical order after selection.

  • Is it the expected behavior or a bug?
  • Is there any way to configure the input to keep the order in which the user selects the elements?

If that is not the case, would there be a way to implement that?

Adeynack avatar Mar 09 '22 23:03 Adeynack

Could you elaborate a bit more? I'm not sure, I understand the issue. Haven't worked with multiple selects with this gem myself so far.

tf avatar Apr 05 '22 08:04 tf

In my specific application, we are proposing to the administrator to configure up to 3 items to display (it's a bit of a content management system). We want those 3 items to be displayed in the order they selected, which this component does not offer.

Now, a colleague of mine also explained to me a bit better what this component here is, and it's basically wrapping a basic HTML multi-select, which is not something offering ordering of the selection. For that reason, I am not even sure if what I am requesting here is possible in this component, the way it is done. If that is the case, feel free, dear maintainer, to leave me a quick note here about it and close the issue. If it is possible, well that would make me a very happy nerd 🤓 .

Adeynack avatar Apr 08 '22 07:04 Adeynack