Select2 does not autoselect

Hello,
I am using select2 with jqgrid.
something is not working correctly, these are the cases when I edit a row.

WITHOUT OPTGROUP

  1. standard select (no select2) without optgroup: select will show the selected item (the one i’m editing)
  2. select2 without optgroup: select will show the selected item (the one i’m editing)

WITH OPTGROUP
3. standard select (no select2) with optgroup: select will show the selected item (the one i’m editing)
4. select2 with optgroup: select will NOT show the selected item (the one i’m editing) but when I open it il will focus the selected item.

So my problem is #4. Is it a bug or am I missing something?

Thank you,
Lorenzo