Split processing autocomplete and drawing it (#3662)

This commit is contained in:
Thomas Nind
2024-08-14 20:19:32 +01:00
committed by GitHub
parent a661fcecf7
commit f9a1d0345e

View File

@@ -1016,8 +1016,7 @@ public class TextField : View
RenderCaption ();
ProcessAutocomplete ();
DrawAutocomplete ();
_isDrawing = false;
}
@@ -1767,8 +1766,21 @@ public class TextField : View
return;
}
// draw autocomplete
GenerateSuggestions ();
}
private void DrawAutocomplete ()
{
if (SelectedLength > 0)
{
return;
}
if (Autocomplete?.Context == null)
{
return;
}
var renderAt = new Point (
Autocomplete.Context.CursorPosition,