list: Fix to set_selected_index when List up, down to select item. (#398)
This commit is contained in:
parent
8c3997d795
commit
270493f3ce
1 changed files with 2 additions and 0 deletions
|
|
@ -284,6 +284,7 @@ where
|
|||
self.selected_index = Some(self.delegate.items_count(cx) - 1);
|
||||
}
|
||||
|
||||
self.delegate.set_selected_index(self.selected_index, cx);
|
||||
self.scroll_to_selected_item(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
|
@ -303,6 +304,7 @@ where
|
|||
self.selected_index = Some(0);
|
||||
}
|
||||
|
||||
self.delegate.set_selected_index(self.selected_index, cx);
|
||||
self.scroll_to_selected_item(cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue