You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I execute a search and get results back, if there's only one result, I automatically set that data set to CurrentSelectedObject which gets populated in the input. However, the typeahead-results dropdown remains (with one option in it), until the user physically selects it. Is there a method I can call to hide the results box (if I set results to empty, it shows the NotFound template).
private async Task<IEnumerable<MyObject>> SearchDataSet(string searchText)
{
if (!string.IsNullOrEmpty(searchText))
{
var results = await _myService.FindByText(searchText);
if (results.Count().Equals(1))
{
CurrentSelectedObject = results[0];
/// need to hide the results from showing on the UI as there's only one option
}
return results;
}
else
{
return null;
}
}
Any help for this?
The text was updated successfully, but these errors were encountered:
I'm have the following:
When I execute a search and get results back, if there's only one result, I automatically set that data set to CurrentSelectedObject which gets populated in the input. However, the typeahead-results dropdown remains (with one option in it), until the user physically selects it. Is there a method I can call to hide the results box (if I set results to empty, it shows the NotFound template).
Any help for this?
The text was updated successfully, but these errors were encountered: