Skip to content

Commit

Permalink
fix(dropdown): position to the selected item in lv_dropdown_set_selected
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Aug 25, 2023
1 parent bcebafe commit f174589
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widgets/lv_dropdown.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit f174589

Please sign in to comment.