Drop-down list cannot get selected option index

Important: posts that do not use this template will be ignored or closed.

i try to use drop-down list in my project. function lv_dropdown_get_selected( ddlist ) seems invalid in callback funtion. lvgl v7.30

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Try to reproduce the issue in a Simulator. If it’s working there then probably it’s not a LittlevGL issue.

Delete this section if you read and applied the mentioned points.

Description

What MCU/Processor/Board and compiler are you using?

What do you experience?

Give a detailed description. “It doesn’t work” is not enough information for us to diagnose the issue.

What do you expect?

Code to reproduce

Add a code snippet to reproduce the issue in the simulator. It should contain only the relevant code which can be compiled. Bug reports without code snippets or with erroneous code snippets will not be reviewed.

Use the ```c and ``` tags to format your code:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current issue.

Please fill in the template and provide a code sample.