This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit b9a152fd30de4b9017b9b5653d1c7b8075e4c481 Author: Alex Harui <[email protected]> AuthorDate: Mon Oct 21 19:47:10 2019 -0700 handle requireSelection = true. Should fix #517 --- .../src/main/royale/spark/components/supportClasses/ListBase.as | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ListBase.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ListBase.as index edbb211..ceb60a4 100644 --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ListBase.as +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ListBase.as @@ -2186,6 +2186,8 @@ public class ListBase extends SkinnableContainer if (!getBeadByType(IBeadLayout)) addBead(new ListBaseLayout()); super.addedToParent(); + if (requireSelection && selectedIndex == -1) + selectedIndex = 0; setActualSize(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight()); }
