File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
2626 Utils ,
2727 _updateCharactersInRangeReplacementString ,
2828 backgroundInternalProperty ,
29+ colorProperty ,
2930 editableProperty ,
3031 fontInternalProperty ,
3132 hintProperty ,
@@ -275,6 +276,20 @@ export class TextField extends TextFieldBase {
275276 view . selectedTextRange = view . textRangeFromPositionToPosition ( pos , pos ) ;
276277 }
277278 }
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+ }
278293 [ editableProperty . setNative ] ( value : boolean ) {
279294 this . clearFocus ( ) ;
280295 // this.nativeTextViewProtected.enabled = value;
You can’t perform that action at this time.
0 commit comments