From 2a7d2cedc362e0b5ff50696f124f65e7b4b23054 Mon Sep 17 00:00:00 2001 From: sdoroff Date: Tue, 8 May 2018 17:26:02 -0400 Subject: [PATCH] Fixes #1554 The issue was caused by the lack of a proper TextChanged event on the TextBox I implemented a work around --- src/Avalonia.Controls/AutoCompleteBox.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Avalonia.Controls/AutoCompleteBox.cs b/src/Avalonia.Controls/AutoCompleteBox.cs index 8e801d606b..351cbf5520 100644 --- a/src/Avalonia.Controls/AutoCompleteBox.cs +++ b/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