question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Programmatically change the EditableTextBase's widgets keyboardType property

See original GitHub issue

Please, 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:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Oatelauscommented, Nov 29, 2018

@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

0reactions
lock[bot]commented, Nov 29, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found