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.

Cannot Clear Text Programatically

See original GitHub issue

First off, AMAZING product! Very easy to set up and get right to using.

That being said, I am running into an issue where I cannot clear/remove the text from the field through code - the only way is to manually delete the characters through the keyboard.

I have tried the following AutoSuggestBox.Text = string.Empty AutoSuggestBox.Text = "" AutoSuggestBox.SetValue(AutoSuggestBox.TextProperty, string.Empty); AutoSuggestBox.SetValue(AutoSuggestBox.TextProperty, "");

@dotMorten, is there something that I am not doing right? I do not have any variable bindings. If not. could you please take a look at what could be causing this issue.

Thanks! Zach

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dotMortencommented, Jan 23, 2019
0reactions
mfeingolcommented, Jan 23, 2019

Here’s a simple repro using your version 0.5.0. If you set a breakpoint on the Text setter in the main page, you’ll see that after the page assigns a value to the property, the AutoSuggestBox turns around and sets it to String.Empty via the two-way binding.

(Context: my goal is to simply to assign an initial value to the AutoSuggestBox’s text.)

XamarinFormsSample.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clear text in EditText when entered [duplicate]
It's simple: declare the widget variables ( editText , textView , button etc.) in class but initialize it in onCreate after setContentView . ......
Read more >
Cannot programmatically clear search text · Issue #51
It appears that the value has been cleared in the UI, however, as soon as I focus on the text box the previously...
Read more >
Clear the text in text_input
I can get the text entered by a user for streamlit.text_input. Is there a way to empty the text that was entered?
Read more >
Unable to programmatically clear single selection #4749
When trying to programmatically clear a selection, and return to the placeholder value, none of the following examples are working (found in ...
Read more >
[Solved] how to clear EditText's Content in android
but our method has to clear EditText which is clicked by user . the only thing you should do is to get id...
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