mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix: mostRecentEventCount is not updated. (#17990)
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> Update it's value as it changes on the JS thread, so that updated value is used (https://github.com/facebook/react-native/blob/f7f5dc66493ad25a85927a9503728b0491c8aab9/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java#L243) whenever setSelection(int start, int end) is called (https://github.com/facebook/react-native/blob/f7f5dc66493ad25a85927a9503728b0491c8aab9/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java#L315). Pull Request resolved: https://github.com/facebook/react-native/pull/17990 Differential Revision: D14255969 Pulled By: mdvacca fbshipit-source-id: 555d6752eabca5c31c1762955a56f99cc1828546
This commit is contained in:
committed by
Facebook Github Bot
parent
5b98adf629
commit
60c0a60c50
@@ -236,6 +236,10 @@ public class ReactEditText extends EditText {
|
||||
mContentSizeWatcher = contentSizeWatcher;
|
||||
}
|
||||
|
||||
public void setMostRecentEventCount(int mostRecentEventCount) {
|
||||
mMostRecentEventCount = mostRecentEventCount;
|
||||
}
|
||||
|
||||
public void setScrollWatcher(ScrollWatcher scrollWatcher) {
|
||||
mScrollWatcher = scrollWatcher;
|
||||
}
|
||||
|
||||
+5
@@ -408,6 +408,11 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
||||
} catch (IllegalAccessException ex) {}
|
||||
}
|
||||
|
||||
@ReactProp(name= "mostRecentEventCount", defaultInt = 0)
|
||||
public void setMostRecentEventCount(ReactEditText view, int mostRecentEventCount) {
|
||||
view.setMostRecentEventCount(mostRecentEventCount);
|
||||
}
|
||||
|
||||
@ReactProp(name = "caretHidden", defaultBoolean = false)
|
||||
public void setCaretHidden(ReactEditText view, boolean caretHidden) {
|
||||
view.setCursorVisible(!caretHidden);
|
||||
|
||||
Reference in New Issue
Block a user