[ https://issues.apache.org/jira/browse/FLEX-15274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13633934#comment-13633934 ]
Mark Kessler commented on FLEX-15274: ------------------------------------- Test app data <?xml version="1.0" encoding="utf-8"?> <!--- Test application --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="onCreationComplete();"> <fx:Script> <![CDATA[ protected function onCreationComplete():void { trace("Setting selectedIndex to (1) then to (-1) then showing results"); cboTest.selectedIndex = 1; cboTest.selectedIndex = -1; trace(" selectedIndex: " + String(cboTest.selectedIndex)); trace(" selectedItem: " + String(cboTest.selectedItem)); trace(""); trace("Setting selectedItem to ('Green') then to (null) then showing results"); cboTest.selectedItem = 'Green'; cboTest.selectedItem = null; trace(" selectedIndex: " + String(cboTest.selectedIndex)); trace(" selectedItem: " + String(cboTest.selectedItem)); } ]]> </fx:Script> <s:layout> <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" gap="0" /> </s:layout> <mx:ComboBox id="cboTest" dataProvider="['Blue', 'Green', 'Red']" /> </s:Application> > ComboBox: setting selectedItem=null does not reset the control as it is > should be > --------------------------------------------------------------------------------- > > Key: FLEX-15274 > URL: https://issues.apache.org/jira/browse/FLEX-15274 > Project: Apache Flex > Issue Type: Bug > Components: mx: ComboBox > Affects Versions: Adobe Flex SDK 3.0 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Assignee: Mark Kessler > > There was a similar bug > https://bugs.adobe.com/jira/browse/SDK-11282 > It has not been fixed in Flex 3 Release despite of its status. > Please an attached example why setting selectedItem to null should reset > ComboBox. > Steps to reproduce: > 1. press button Some > 2. Close popup > 3. press button None > At this point ComboBox should be empty. But it displays "one". Wrong. > 4. close popup > 5. press button None again > Combo is empty now. > > Workaround (if any): > > As possible workaround selectedIndex could do the trick, but it does not work > in cached multi-state windows when creation of the Combox and connection of > the dataProvider happens at different time which causes sometimes > cancellation of previously happened binding. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira