mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00

recycleNativeView filed now accepts: "always" | "never" | "auto". Always will recycle the nativeView no matter if its nativeView or android proprties are accessed. Never will disable recycling. Auto will recycle it only if nativeView and android properties are not accessed.
14 lines
506 B
TypeScript
14 lines
506 B
TypeScript
import { HtmlView as HtmlViewDefinition } from ".";
|
|
import { View, Property } from "../core/view";
|
|
|
|
export * from "../core/view";
|
|
|
|
export class HtmlViewBase extends View implements HtmlViewDefinition {
|
|
public html: string;
|
|
}
|
|
|
|
HtmlViewBase.prototype.recycleNativeView = "auto";
|
|
|
|
// TODO: Can we use Label.ios optimization for affectsLayout???
|
|
export const htmlProperty = new Property<HtmlViewBase, string>({ name: "html", defaultValue: "", affectsLayout: true });
|
|
htmlProperty.register(HtmlViewBase); |