Singleline <TextInput> now has intrinsic size

Summary:
Singleline <TextInput> now has intrinsic size which is equal to size of placeholder.
And if <TextInput> does not have placeholder it still has intrinsic height.
So, we don't need to set the size up manually every single time anymore!

(Multiline <TextInput> already has this feature.)

Reviewed By: mmmulani

Differential Revision: D5069971

fbshipit-source-id: f65c1062a812259b66d287929314dc571dc1f3ee
This commit is contained in:
Valentin Shergin
2017-05-29 15:56:38 -07:00
committed by Facebook Github Bot
parent c98fc33ce5
commit ea9d6746df
4 changed files with 41 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ RCT_EXPORT_MODULE()
- (UIView *)view
{
return [[RCTTextField alloc] initWithEventDispatcher:self.bridge.eventDispatcher];
return [[RCTTextField alloc] initWithBridge:self.bridge];
}
RCT_EXPORT_VIEW_PROPERTY(caretHidden, BOOL)