Select2 – maintainOrder = true and with multiple = true not Maintain order when update()

Web Tips Q & ACategory: Krajee PluginsSelect2 – maintainOrder = true and with multiple = true not Maintain order when update()
Wilson asked 1 year ago

maintainOrder=true with multiple=>true has a problem when updating.
When insert a new record, this new function work correct maintain the order, but, when update the items are ordered by list id and not the original order saved in the database
For example on actionUpdate()
$acao->usuarios_envolvidos = [29,34];
On select 2 view, the id element 34 appears first

1 Answers
Kartik Staff answered 1 year ago

This has been enhanced and fixed in the latest release of the yii2-widget-select2 extension. You may want to upgrade.

Login or register to contribute or comment.

Login   Register