Disable recycling of native views

createNativeView will set iOS nativeView if it is null/undefined
This commit is contained in:
Hristo Hristov
2017-03-28 18:08:39 +03:00
parent 84e726e6b9
commit e6250e718a
59 changed files with 112 additions and 97 deletions

View File

@@ -10,7 +10,7 @@ export class SliderBase extends View implements SliderDefinition {
public maxValue: number;
}
SliderBase.prototype.recycleNativeView = true;
// SliderBase.prototype.recycleNativeView = true;
/**
* Represents the observable property backing the value property of each Slider instance.

View File

@@ -58,6 +58,7 @@ export class Slider extends SliderBase {
}
public initNativeView(): void {
super.initNativeView();
const nativeView: any = this.nativeView;
nativeView.listener.owner = this;
}
@@ -65,6 +66,7 @@ export class Slider extends SliderBase {
public disposeNativeView() {
const nativeView: any = this.nativeView;
nativeView.listener.owner = null;
super.disposeNativeView();
}
/**