Skip to content

Commit 56d7066

Browse files
author
farfromrefug
committed
fix(android): update indicator on items change
1 parent 69a5420 commit 56d7066

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ui-pager/index.android.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ export class Pager extends PagerBase {
6767
set views(value: any[]) {
6868
this._views = value;
6969
}
70-
70+
setObservableArrayInstance(value) {
71+
super.setObservableArrayInstance(value);
72+
if (this.indicator) {
73+
this.indicator.setCount(this.items ? this.items.length : 0);
74+
}
75+
}
7176
public createNativeView() {
7277
const nativeView = new androidx.viewpager2.widget.ViewPager2(this._context);
7378
nativeView.setOffscreenPageLimit(-1);

0 commit comments

Comments
 (0)