Programmatically change the EditableTextBase's widgets keyboardType property
See original GitHub issuePlease, provide the details below:
Did you verify this is a real problem by searching [Stack Overflow]
Yes. I have searched. But I din’t get.
Tell us about the problem
I tried to change textfield/textview widget’s keyboardType property Programmatically/Dynamically based on some other widget’s onTap event. But i can’t able to refer the keyboardType property to the textfield reference in .ts file.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
- CLI: 3.0.3
- Cross-platform modules: 3.1.0
- Runtime(s): 3.2.0
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
public changeKB(args){ let cont = <View>this.texfield.nativeElement; if(args == "num"){ cont.android.keyboardType="number"; } else if(args == "normal"){ cont.android.keyboardType="email"; } }
Regarding this i have raised the topic on NS forum [thread].(https://discourse.nativescript.org/t/programmatically-change-the-editabletextbases-widgets-keyboardtype-property/2665)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Programmatically change UITextField Keyboard type
There is a keyboardType property for a UITextField : typedef enum { UIKeyboardTypeDefault, // Default type for the current input method.
Read more >Keyboard - NativeScript Docs
All widgets that inherit from EditableTextBase , i.e., TextField and TextView , have a keyboardType property that gets or sets the soft keyboard...
Read more >How to Change Keyboard Type Input on TextField in Flutter
In this exampe, we are going to show you the way to change the keyboard input type in TextField widget in Flutter App....
Read more >The jqxDateTimeInput provides keyboard navigation once it ...
Once focus is received, users will be able to use the keyboard to change the active tab page. A second tab will take...
Read more >Reading and updating control properties on a page
Modify widget properties programmatically using the API. ... How to update a control property of a widget on a specific page?
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@NickIliev it doesn’t appear to be working as per the information in this issue. Below is a playground of which the keyboard type is completely ignored, unless set via the attribute.
https://play.nativescript.org/?template=play-ng&id=IA4TRB&v=2
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.