feat(HtmlView): selectable property (#10057)

This commit is contained in:
Ruslan Lekhman
2022-10-14 19:47:59 -06:00
committed by GitHub
parent 4a0e1c9aa1
commit ca9c0928d0
4 changed files with 38 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
import { Color } from '../../color';
import { Font } from '../styling/font';
import { colorProperty, fontInternalProperty } from '../styling/style-properties';
import { HtmlViewBase, htmlProperty, linkColorProperty } from './html-view-common';
import { HtmlViewBase, htmlProperty, selectableProperty, linkColorProperty } from './html-view-common';
import { View } from '../core/view';
import { iOSNativeHelper, layout } from '../../utils';
@@ -59,10 +59,6 @@ export class HtmlView extends HtmlViewBase {
}
}
[htmlProperty.getDefault](): string {
return '';
}
private renderWithStyles() {
let html = this.currentHtml;
const styles = [];
@@ -86,11 +82,21 @@ export class HtmlView extends HtmlViewBase {
}
}
[htmlProperty.getDefault](): string {
return '';
}
[htmlProperty.setNative](value: string) {
this.currentHtml = value;
this.renderWithStyles();
}
[selectableProperty.getDefault](): boolean {
return true;
}
[selectableProperty.setNative](value: boolean) {
this.nativeViewProtected.selectable = value;
}
[colorProperty.getDefault](): UIColor {
return this.nativeViewProtected.textColor;
}