Reset focus in SelectView::clear

This commit is contained in:
Alexandre Bury 2017-03-27 13:07:22 -07:00
parent f7b6397588
commit 09202f55c8

View File

@ -198,6 +198,7 @@ impl<T: 'static> SelectView<T> {
/// Removes all items from this view.
pub fn clear(&mut self) {
self.items.clear();
self.focus.set(0);
}
/// Adds a item to the list, with given label and value.