mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 00:03:22 +00:00
implement search delegate
This commit is contained in:
@@ -34,6 +34,7 @@ namespace Bit.iOS.Autofill
|
|||||||
TableView.RowHeight = UITableView.AutomaticDimension;
|
TableView.RowHeight = UITableView.AutomaticDimension;
|
||||||
TableView.EstimatedRowHeight = 44;
|
TableView.EstimatedRowHeight = 44;
|
||||||
TableView.Source = new TableSource(this);
|
TableView.Source = new TableSource(this);
|
||||||
|
SearchBar.Delegate = new SearchDelegate(this);
|
||||||
await ((TableSource)TableView.Source).LoadItemsAsync(false, SearchBar.Text);
|
await ((TableSource)TableView.Source).LoadItemsAsync(false, SearchBar.Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,4 +159,19 @@ namespace Bit.iOS.Autofill
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SearchDelegate : UISearchBarDelegate
|
||||||
|
{
|
||||||
|
private readonly LoginSearchViewController _controller;
|
||||||
|
|
||||||
|
public SearchDelegate(LoginSearchViewController controller)
|
||||||
|
{
|
||||||
|
_controller = controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnEditingStopped(UISearchBar searchBar)
|
||||||
|
{
|
||||||
|
base.OnEditingStopped(searchBar);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user