From f92ca875a3b90b751e4f428bd7f18b96b4ff3360 Mon Sep 17 00:00:00 2001 From: Dimitris - Rafail Katsampas Date: Thu, 12 May 2022 22:16:31 +0000 Subject: [PATCH] fix: Added missing notify for selectedIndexChangedEvent. --- src/ui-pager/index.common.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ui-pager/index.common.ts b/src/ui-pager/index.common.ts index d0b2efa..84fd6af 100644 --- a/src/ui-pager/index.common.ts +++ b/src/ui-pager/index.common.ts @@ -97,7 +97,6 @@ export abstract class PagerBase extends ContainerView implements AddChildFromBui public autoPlayDelay: number; public autoPlay: boolean; public static selectedIndexChangedEvent = 'selectedIndexChanged'; - public static selectedIndexChangeEvent = 'selectedIndexChange'; public static scrollEvent = 'scroll'; public static swipeEvent = 'swipe'; public static swipeStartEvent = 'swipeStart'; @@ -373,6 +372,14 @@ export const selectedIndexProperty = new CoercibleProperty({ name: 'selectedIndex', defaultValue: -1, // affectsLayout: global.isIOS, + valueChanged: (target, oldValue, newValue) => { + target.notify({ + eventName: PagerBase.selectedIndexChangedEvent, + object: target, + oldIndex: oldValue, + newIndex: newValue + }); + }, coerceValue: (target, value) => { const items = target._childrenCount; if (items) {