Browse Source

Fixes #1554

The issue was caused by the lack of a proper TextChanged event on the TextBox
I implemented a work around
pull/1570/head
sdoroff 8 years ago
parent
commit
2a7d2cedc3
  1. 4
      src/Avalonia.Controls/AutoCompleteBox.cs

4
src/Avalonia.Controls/AutoCompleteBox.cs

@ -1954,6 +1954,10 @@ namespace Avalonia.Controls
// 1. Minimum prefix length
// 2. If a delay timer is in use, use it
bool populateReady = newText.Length >= MinimumPrefixLength && MinimumPrefixLength >= 0;
if(populateReady && MinimumPrefixLength == 0 && String.IsNullOrEmpty(newText) && String.IsNullOrEmpty(SearchText))
{
populateReady = false;
}
_userCalledPopulate = populateReady ? userInitiated : false;
// Update the interface and values only as necessary

Loading…
Cancel
Save