mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(dropdown): position to the selected item in lv_dropdown_set_selected
This commit is contained in:
parent
bcebafe4fb
commit
f174589240
@ -285,6 +285,10 @@ void lv_dropdown_set_selected(lv_obj_t * obj, uint16_t sel_opt)
|
||||
dropdown->sel_opt_id = sel_opt < dropdown->option_cnt ? sel_opt : dropdown->option_cnt - 1;
|
||||
dropdown->sel_opt_id_orig = dropdown->sel_opt_id;
|
||||
|
||||
if(dropdown->list) {
|
||||
position_to_selected(obj);
|
||||
}
|
||||
|
||||
lv_obj_invalidate(obj);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user