Skip to content

Commit

Permalink
fix: Added missing notify for selectedIndexChangedEvent.
Browse files Browse the repository at this point in the history
  • Loading branch information
CatchABus committed May 12, 2022
1 parent 62c7667 commit f92ca87
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ui-pager/index.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -373,6 +372,14 @@ export const selectedIndexProperty = new CoercibleProperty<PagerBase, number>({
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) {
Expand Down

0 comments on commit f92ca87

Please sign in to comment.