Commit Graph

9 Commits

Author SHA1 Message Date
Valentin Shergin f89e132719 TextInput: textInputShouldEndEditing and textInputDidEndEditing were moved to base class
Reviewed By: mmmulani

Differential Revision: D5395925

fbshipit-source-id: 0c67beccd74d981ab2a89f9cb31990301793b408
2017-07-18 14:46:22 -07:00
Valentin Shergin a50c9c8e22 TextInput: `selection` property was unified
Summary:
This diff unifies `selection` prop between single line and multi line text inputs.
Besides that, this diff improves the selection event handling, makes it more robust and predictable.
(See inline comments.)

Reviewed By: mmmulani

Differential Revision: D5317652

fbshipit-source-id: db5b0d2c0b80268e479ba866980e14b444079386
2017-07-18 14:46:22 -07:00
Valentin Shergin d69e60bb7a TextInput: Unified support of `clearTextOnFocus` prop
Summary: The implementation of `clearTextOnFocus` was unified and moved to baseclass.

Reviewed By: javache

Differential Revision: D5299489

fbshipit-source-id: ff166f9bb0673ff8766f20b677f56810f64d7b2d
2017-07-18 14:46:22 -07:00
Valentin Shergin cb96f1d5d2 TextInput: Unified support of `clearsOnBeginEditing` prop
Summary: The implementation of `clearsOnBeginEditing` was unified and moved to superclass.

Reviewed By: javache

Differential Revision: D5299396

fbshipit-source-id: 98c5494a782cbe4df5b2d6021828eb7b2012f6dc
2017-07-18 14:46:22 -07:00
Valentin Shergin 8f93ce680d TextInput: Unified support of `blurOnSubmit` prop
Summary:
Now the business logic of `blurOnSubmit` is pretty simple and lives inside `RCTTextInput`,
whereas UIKit hacks/workarounds lives inside `RCTBackedTextInputDelegateAdapter`.

Reviewed By: javache

Differential Revision: D5299397

fbshipit-source-id: 6a9d4194324ff9446c74fdb32ad5357e849e471d
2017-07-18 14:46:22 -07:00
Valentin Shergin da9a183e81 TextInput `setSelection` method was moved to base class
Summary: This method was identical between two subclasses, so it was moved to baseclass.

Reviewed By: javache

Differential Revision: D5297401

fbshipit-source-id: 8f56bef33f9ab0184f69da76177b5e8da10d7514
2017-07-18 14:46:22 -07:00
Marc Horowitz 1ef21ece92 OSS build fix: use #import "..." instead of #import <RCTText/...>
Reviewed By: javache

Differential Revision: D5361615

fbshipit-source-id: 90d08eb5dea81253c1f7ea582ed2508eec1ba117
2017-07-06 17:07:28 -07:00
Valentin Shergin a8c45ac1c3 RCTTextInput: Common layout logic was moved to base class
Summary:
Nothing really changed except that there is no code duplication in this part anymore.
More unification is coming!

Reviewed By: mmmulani

Differential Revision: D5144435

fbshipit-source-id: 390f795be3228907b254f8656783232013c36abe
2017-06-27 16:22:44 -07:00
Valentin Shergin 3364488af0 Introducting `RCTTextInput`, base class for both text inputs
Summary: Some basic same to both classes functionality was moved to base class, and it is just a beginning.

Reviewed By: mmmulani

Differential Revision: D5144429

fbshipit-source-id: 56c6400d46f4cf3c0058fe936cba524dd5d490df
2017-06-27 16:22:44 -07:00