Merge pull request #6046 from capilkey/reset-rollover-on-recycle

Reset rolledOver when user itemrenderers are used for a different user
This commit is contained in:
Richard Alam 2018-09-06 17:38:11 -04:00 committed by GitHub
commit b5430aa30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -91,8 +91,16 @@
BindingUtils.bindSetter(updateButtons, viewingStreamInd, "visible");
}
override public function set data(value:Object):void {
//reset rolledOver when the data changes because onRollOut wont be called if the row moves
if (data == null || value == null || data.userId != value.userId) {
rolledOver = false;
}
super.data = value;
}
private function dataChangeHandler(e:Event):void {
//rest rolledOver when the data changes because onRollOut wont be called if the row moves
if (data != null) {
updateButtons();
validateNow();

View File

@ -84,6 +84,15 @@
validateNow();
}
override public function set data(value:Object):void {
//reset rolledOver when the data changes because onRollOut wont be called if the row moves
if (data == null || value == null || data.userId != value.userId) {
rolledOver = false;
}
super.data = value;
}
private function dataChangeHandler(e:Event):void {
if (data != null) {
updateButtons(); //reassess data state on change