AccordionCollapseBead can use the same fix.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/222f1429 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/222f1429 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/222f1429 Branch: refs/heads/feature/amf Commit: 222f14294741aa759ac9947fc916bc5dd32542b2 Parents: 1e19ff5 Author: Harbs <ha...@in-tools.com> Authored: Mon Jul 24 14:50:01 2017 +0300 Committer: Harbs <ha...@in-tools.com> Committed: Mon Jul 24 14:50:01 2017 +0300 ---------------------------------------------------------------------- .../flex/org/apache/flex/html/beads/AccordionCollapseBead.as | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/222f1429/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccordionCollapseBead.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccordionCollapseBead.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccordionCollapseBead.as index 163c276..70a09da 100644 --- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccordionCollapseBead.as +++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/AccordionCollapseBead.as @@ -69,11 +69,9 @@ package org.apache.flex.html.beads { return; } - if (lastSelectedIndex > -1) - { - var lastElement:ICollapsible = view.dataGroup.getItemRendererForIndex(lastSelectedIndex) as ICollapsible; + var lastElement:ICollapsible = view.dataGroup.getItemRendererForIndex(lastSelectedIndex) as ICollapsible; + if(lastElement) lastElement.collapse(); - } lastSelectedIndex = host.selectedIndex; layout.flexibleChild = String(host.selectedIndex); IEventDispatcher(_strand).dispatchEvent(new Event("layoutNeeded"));