TextInput.on_change does not seem to work
See original GitHub issueHello! I just started learning toga and played with tutorial “A slightly less toy example” and came across a problem. Please tell me, it’s a bug or I’m doing something wrong.
Expected Behavior
I added on_change handler to f_input: f_input.on_change = calculate
. I expect that when you change the value in the field, the function calculate
will be called.
Current Behavior
The function calculate
is not called.
Your Environment
-
Python Version (list the specific version number) 3.5
-
Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)
- macOS - version:
- Linux - distro: Mint - version: 18.3
- Windows - version:
- Other - name: - version:
-
Toga Target (the type of app you are trying to generate)
- android
- cocoa
- django
- gtk
- iOS
- tvOS
- watchOS
- winforms
- win32
- Other (please specify)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
TextInput React Native not working onChangeText
I have destructured it but it does not work unless I put the text inside the app return statement. It types one work...
Read more >Solved: OnChange() of a textInput doesn't work when enter
Solved: Hi, I have a Text Input object. The "format" field is set to Number. If I am in the Text Input and...
Read more >TextInput value can't be change during onChangeText [iOS]
TextInput's value property does not seem to get in sync when changing state via onChangeText. An example use case would be blocking non ......
Read more >onchange event on lightning input tag in lwc fires but not ...
On the handler, i am trying to assign some value to a @track property which is referred on the for:each iterative to populate...
Read more >How to Use TextInput Component to Change State in React ...
First, we need to use a component called “TextInput” , we need to import that at the top. The input field is just...
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
I think the credit for the full fix goes to @cachitas in acc206d; but I agree this is now fixed.
It looks like @maranas resolved this issue back in Mar 2019 here by subscribing to the
changed
event of the native Gtk widget. From GTK Reference - the"changed"
signalI installed toga-0.3.0.dev20 this morning and am not experiencing this issue. My on_change handler is being fired on every keystroke or after a cut or a paste. Using this app with only a text input: (can be pasted directly into console)