()
| 668 | } |
| 669 | |
| 670 | public refresh() { |
| 671 | // clear bindingContext when it is not observable because otherwise bindings to items won't reevaluate |
| 672 | this._map.forEach((view, nativeView, map) => { |
| 673 | if (!(view.bindingContext instanceof Observable)) { |
| 674 | view.bindingContext = null; |
| 675 | } |
| 676 | }); |
| 677 | this._headerMap.forEach((view, nativeView, map) => { |
| 678 | if (!(view.bindingContext instanceof Observable)) { |
| 679 | view.bindingContext = null; |
| 680 | } |
| 681 | }); |
| 682 | |
| 683 | if (this.isLoaded) { |
| 684 | this.nativeViewProtected.reloadData(); |
| 685 | this.requestLayout(); |
| 686 | this._isDataDirty = false; |
| 687 | } else { |
| 688 | this._isDataDirty = true; |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | public isItemAtIndexVisible(itemIndex: number): boolean { |
| 693 | const indexes: NSIndexPath[] = Array.from(this.nativeViewProtected.indexPathsForVisibleRows); |
no test coverage detected