Fix text not being restored from state in TextInput
Summary: Changelog: [internal] Restore text value from state when re-initialising RCTTextInputComponentView Reviewed By: shergin Differential Revision: D22844624 fbshipit-source-id: b47e3fe890793f8de429b637535d641262c42be2
This commit is contained in:
Родитель
7e0824027e
Коммит
22c1032dbc
|
@ -222,8 +222,13 @@ using namespace facebook::react;
|
|||
return;
|
||||
}
|
||||
|
||||
auto data = _state->getData();
|
||||
|
||||
if (!oldState) {
|
||||
_mostRecentEventCount = _state->getData().mostRecentEventCount;
|
||||
}
|
||||
|
||||
if (_mostRecentEventCount == _state->getData().mostRecentEventCount) {
|
||||
auto data = _state->getData();
|
||||
_comingFromJS = YES;
|
||||
[self _setAttributedString:RCTNSAttributedStringFromAttributedStringBox(data.attributedStringBox)];
|
||||
_comingFromJS = NO;
|
||||
|
|
Загрузка…
Ссылка в новой задаче