Set proper for layout for current selection.

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e27b6d01
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e27b6d01
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e27b6d01

Branch: refs/heads/feature/mdl
Commit: e27b6d0131d4bbd017ab0e58183e3518c290deaf
Parents: 1aa9525
Author: yishayw <[email protected]>
Authored: Sun Dec 11 13:28:07 2016 +0200
Committer: yishayw <[email protected]>
Committed: Sun Dec 11 13:28:07 2016 +0200

----------------------------------------------------------------------
 .../HTML/src/main/flex/org/apache/flex/html/Accordion.as      | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e27b6d01/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Accordion.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Accordion.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Accordion.as
index 4c376ea..bd1633f 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Accordion.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Accordion.as
@@ -19,6 +19,8 @@
 package org.apache.flex.html
 {
        import org.apache.flex.core.ValuesManager;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
        import org.apache.flex.html.beads.IAccordionCollapseBead;
        
        
@@ -54,6 +56,11 @@ package org.apache.flex.html
                        if (selectedIndex < 0)
                        {
                                selectedIndex = 0;
+                       } else
+                       {
+                               // TODO this should probably be done in List, 
but it's too hacky
+                               // This is my way of setting the proper item 
renderer state and layout 
+                               (model as IEventDispatcher).dispatchEvent(new 
Event("selectedIndexChanged"));
                        }
                }
                

Reply via email to