I use clear method of dynamic combo in order to delete all options before I regenerate them.But the clear method doesn’t delete currently selected option.So when I try to regenerate options for combo I always have one extra undesired option .
But same code works well when I set renderasfield option to true.
…the combobox always adds the item that is currently selected. If the list of options is 1,2,3,4 and the current value is 5, then automatically 5 is added - otherwise nothing is displayed…
Hi Bjoern ,
I made an simple example to make myself clear and I recognized that my problem happens just in one case.If the value of previously selected item does not exists in new option list , the combo box automatically adds that value to new option list.
To see this problem can you please try the following codes in your ide.Just select option2 from combo1 and select an option from combo2 which has a value greater than 2.After that choose value 1 from combo1 again and you’ll see one extra option appears in combo2.
this is by intention, not by error. In Mozilla an item is only displayed if it is part of the list of available items. As consequence we artificially create one if missing.