Browse Source

Merge pull request #1570 from sdoroff/auto-complete-box-fix

Fix 1554 AutoCompleteBox MinimumPrefixLength issue
pull/1582/merge
Steven Kirk 8 years ago
committed by GitHub
parent
commit
44f33583a0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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