Skip to content

Commit

Permalink
fix: search field does not work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed May 18, 2022
1 parent 3eb31a2 commit 52f9b95
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Editor/Coffee.UpmGitExtension/UI/SearchResultListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void UpdateSearchText(string text = "")

public void UpdateSearchedItems()
{
itemsSource = _searchedItems = _searchFunc()
_searchedItems = _searchFunc()
.Where(repo => 0 <= repo.IndexOf(_searchText, StringComparison.OrdinalIgnoreCase))
.ToArray();

Expand All @@ -41,6 +41,9 @@ public void UpdateSearchedItems()
UIUtils.SetElementDisplay(this, false);
else
style.height = Mathf.Min(count, 5) * _itemHeight;

itemsSource = _searchedItems;
RefreshItems();
}

public SearchResultListView(TextField textField, Func<string[]> searchFunc) : base()
Expand Down

0 comments on commit 52f9b95

Please sign in to comment.