Strange update cycle of SelectBox

Hey, i have some trouble using the select box.

First: I have a class holding parameters for my game. This is a list of values that is used to set as ListItems in the select box, and it is the current active list item (index).

I create a SelectBox and implement the onChange() method. Inside the method I update my value object with the item that was selected in the SelectBox.

After creating the select box, I add all List items into the box. Unfortnunately that seems to call onChange with a selection index of 0. That means that the selected value in my value object is overriden, before I’m able to set it in the UI.

I hope I could the problem clear and someone could give me some hint how to avoid this problem, that my index in the value object is overriden by the first selected item while filling the SelectBox with items.