File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
26
26
Utils ,
27
27
_updateCharactersInRangeReplacementString ,
28
28
backgroundInternalProperty ,
29
+ colorProperty ,
29
30
editableProperty ,
30
31
fontInternalProperty ,
31
32
hintProperty ,
@@ -275,6 +276,20 @@ export class TextField extends TextFieldBase {
275
276
view . selectedTextRange = view . textRangeFromPositionToPosition ( pos , pos ) ;
276
277
}
277
278
}
279
+
280
+ [ colorProperty . setNative ] ( value : Color | { textColor : UIColor ; tintColor : UIColor } ) {
281
+ const nativeView = this . nativeTextViewProtected ;
282
+ if ( value instanceof Color ) {
283
+ const color = value instanceof Color ? value . ios : value ;
284
+ nativeView . setTextColorForState ( color , MDCTextControlState . Normal ) ;
285
+ nativeView . setTextColorForState ( color , MDCTextControlState . Editing ) ;
286
+ nativeView . tintColor = color ;
287
+ } else {
288
+ nativeView . setTextColorForState ( value . textColor , MDCTextControlState . Normal ) ;
289
+ nativeView . setTextColorForState ( value . textColor , MDCTextControlState . Editing ) ;
290
+ nativeView . tintColor = value . tintColor ;
291
+ }
292
+ }
278
293
[ editableProperty . setNative ] ( value : boolean ) {
279
294
this . clearFocus ( ) ;
280
295
// this.nativeTextViewProtected.enabled = value;
You can’t perform that action at this time.
0 commit comments