You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2022/02/03 13:15:37 UTC
[royale-asjs] branch develop updated: Emulate Flex behavior after refresh on sorted collections
This is an automated email from the ASF dual-hosted git repository.
yishayw 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 c59bf5b Emulate Flex behavior after refresh on sorted collections
new cde3aeb Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
c59bf5b is described below
commit c59bf5b1565f09db3ecbd06e08dc07270992615c
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Thu Feb 3 15:15:12 2022 +0200
Emulate Flex behavior after refresh on sorted collections
---
.../controls/beads/models/SingleSelectionICollectionViewModel.as | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/models/SingleSelectionICollectionViewModel.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/models/SingleSelectionICollectionViewModel.as
index 2a7e0fa..8cc3c50 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/models/SingleSelectionICollectionViewModel.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/models/SingleSelectionICollectionViewModel.as
@@ -324,6 +324,13 @@ package mx.controls.beads.models
dispatchEvent(new Event("selectedItemChanged"));
dispatchEvent(new Event("selectedIndexChanged"));
}
+ } else if (event.kind == CollectionEventKind.REFRESH)
+ {
+ if (_selectedIndex != -1)
+ {
+ // make sure sort changes selected item
+ selectedItem = getItemAt(_selectedIndex);
+ }
}
}
}