mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-06 17:52:57 +08:00
Remove support for password property and only use secureTextEntry
Summary: Reduce the public surface area of TextInput. It only exposes a secureTextEntry property, but on Android was also accepting password as a prop. This removes that. Reviewed By: javache Differential Revision: D3392223 fbshipit-source-id: 67c36fbe16fe493e2841d5d9deb78e3be2209ebd
This commit is contained in:
committed by
Facebook Github Bot 8
parent
61046c3195
commit
f3507f99f1
@@ -242,13 +242,13 @@ public class ReactTextInputPropertyTest {
|
||||
mManager.updateProperties(view, buildStyles());
|
||||
assertThat(view.getInputType() & InputType.TYPE_TEXT_VARIATION_PASSWORD).isZero();
|
||||
|
||||
mManager.updateProperties(view, buildStyles("password", false));
|
||||
mManager.updateProperties(view, buildStyles("secureTextEntry", false));
|
||||
assertThat(view.getInputType() & InputType.TYPE_TEXT_VARIATION_PASSWORD).isZero();
|
||||
|
||||
mManager.updateProperties(view, buildStyles("password", true));
|
||||
mManager.updateProperties(view, buildStyles("secureTextEntry", true));
|
||||
assertThat(view.getInputType() & InputType.TYPE_TEXT_VARIATION_PASSWORD).isNotZero();
|
||||
|
||||
mManager.updateProperties(view, buildStyles("password", null));
|
||||
mManager.updateProperties(view, buildStyles("secureTextEntry", null));
|
||||
assertThat(view.getInputType() & InputType.TYPE_TEXT_VARIATION_PASSWORD).isZero();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user