So as the heading says, i want to add custom props to the in-built textInput component in react-native (expo).
So what i tried is i got to the location node_modules\react-native\ReactAndroid\src\main\java\com\facebook\react\views\textinput\ReactTextInputManager.java
where other props are defined (correct me if i am wrong).
There i added this code;
// created a prop to hide suggestions when password is visible
@ReactProp(name = "hideSuggestions", defaultBoolean = false)
public void setHideSuggestions(ReactEditText view, boolean hideSuggestions) {
updateStagedInputTypeFlag(
view,
hideSuggestions ? InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD : 0);
}
Then in C:\Users\irfan\AppData\Local\Microsoft\TypeScript\4.5\node_modules\@types\react-native\index.d.ts
;
hideSuggestions?: boolean | undefined;
And in the textInput, i added hideSuggestions={true}
.
But it is not working (it also doesn't give any error).
So how can i do that.
Also i want to metion here that the above code is just a guess from me how it should work.
I actually copied the code from the other prop and just edited that.