Fix regression issue. Turns out LabelUtil.itemToLabel has side effects and text was not updated on control unless called
diff --git a/frameworks/projects/spark/src/spark/components/DropDownList.as b/frameworks/projects/spark/src/spark/components/DropDownList.as
index e4dbd96..b6dfa01 100644
--- a/frameworks/projects/spark/src/spark/components/DropDownList.as
+++ b/frameworks/projects/spark/src/spark/components/DropDownList.as
@@ -367,11 +367,13 @@
{
if (labelDisplay)
{
- if (displayItem == undefined)
- displayItem = selectedItem;
- else
- labelDisplay.text = displayItem != null ? LabelUtil.itemToLabel(displayItem, labelField, labelFunction) : prompt;
- }
+ if (displayItem == undefined)
+ displayItem = selectedItem;
+ if (displayItem != null && displayItem != undefined)
+ labelDisplay.text = LabelUtil.itemToLabel(displayItem, labelField, labelFunction);
+ else
+ labelDisplay.text = prompt;
+ }
}
}
}
\ No newline at end of file