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 b5b4fdd7a9 A similar interim fix to ADG selectedItems/selectedIndices
getter, when allowMultipleSelection is false
b5b4fdd7a9 is described below
commit b5b4fdd7a9defc50659537e1d2e4abada9df8a62
Author: greg-dove <[email protected]>
AuthorDate: Fri Aug 19 09:17:01 2022 +1200
A similar interim fix to ADG selectedItems/selectedIndices getter, when
allowMultipleSelection is false
---
.../src/main/royale/mx/controls/listClasses/DataGridListBase.as | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
index 9de031e3e3..e3fa399b31 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/DataGridListBase.as
@@ -5751,6 +5751,15 @@ public class DataGridListBase extends ListBase /*
extends UIComponent
{
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)
{