Flex combobox dataprovider not updating
I have a Flex Combo Box that gets populated by a dataprovider all is well...
I would now like to add a default " -- select a item --" option at the 0 index, how can I do this and still use a dataprovider?
In Combo , there is a branch in set Selected Index() that force-updates the text shown in the text field if user Typed Into Text && value == selected Index , probably to cater for cases when the user types some text into the combo box and then changes her mind and decides to select the entry corresponding to the old selection (that was active before she started typing).
In this case, we have to update the text field to ensure that the selected value is shown there (since set Selected Index() in List Base will short-circuit because the selected index stayed the same).
He also wants to allow write-in answers which is why he uses a Combo Box instead of a Drop Down List.The problem is that this is done even when the old and the new selected index are both CUSTOM_SELECTED_ITEM - in that case, we should not update the label display from the current selected item (which has not been updated based on the new text entered into the text field yet).It is not trivial to work around this without modifying Combo - my approach uses a private flag named _prevent Label Display Updates that is set to true when set Selected Index is called with CUSTOM_SELECTED_ITEM and the current selected Index is also equal to CUSTOM_SELECTED_ITEM .The Combo Box will proxy some events and properties from Text Input.Properties: Some properties don't make sense to expose since their value should never change (ex. The properties that are not exposed are provide advanced functionality and can be accessed through the text Input skin part.
Search for flex combobox dataprovider not updating:
This selection element is for picking from a list of package couriers (ie UPS, Fed Ex, etc) or optionally adding your own.