This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new bed1189d42 ADG quick fix for "selectedItems is empty" when
allowMultipleSelection is false but selectedItem/selectedIndex represents one
selected item.
bed1189d42 is described below
commit bed1189d420ae5a495e013b4bb29fe5947379299
Author: greg-dove <[email protected]>
AuthorDate: Thu Jul 21 10:46:29 2022 +1200
ADG quick fix for "selectedItems is empty" when allowMultipleSelection is
false but selectedItem/selectedIndex represents one selected item.
---
.../src/main/royale/mx/controls/listClasses/AdvancedListBase.as | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
index c33328054f..2f965100f5 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
@@ -5729,6 +5729,15 @@ public class AdvancedListBase extends ListBase
implements IFocusManagerComponent
{
var tmp:Array = [];
+ //the following is a temporary workaround until multiple selection
emulation is more widely supported for regular mx List, etc. (planned to be
added in August 2022) :
+ if (!allowMultipleSelection) {
+ var tmpIdx:int = selectedIndex;
+ if (tmpIdx != -1) {
+ tmp[0] = useDataField ? selectedItem : tmpIdx;
+ }
+ return tmp;
+ }
+
var curSelectionData:ListBaseSelectionData = firstSelectionData;
while (curSelectionData != null)
{