How to cancel dorp down list opening

I have an (obscure?) use case in which I need to cancel the opening of a drop down list but at the same time react to a click/press event.
Here is the use case:
The user want to select a wifi network to connect to:

  1. The user click on a wifi AP dropdown list to select an item
  2. The list stays closed but a spinner is shown on top of it.
  3. The program starts a process that will gather the available wifi APs
  4. When this process returns with a list of APs:
    4.1 , the spinner is deleted
    4.2 the dropdown list is filled with the AP list
    4.3 the list is opened so the user can select an AP.

What I tried so far:

  1. Call lv_async_call(close_list,list) in the list’s press event and in the close_list() function I call lv_dropdown_close() This didn’t work at all, the list stays open
  2. Start a timer in the lists pressed event to call the lv_dropdown_close()
    The problem with this is that the list is closed only if then timer is more then 1000 , and by then the list was already opened for one second.
  3. Add the LV_OBJ_FLAG_HIDDEN to the list in press event. The list box gets hidden but the open list stays open.
  4. send a PRESS event in the PRESS event to simulate a second click by the user to close the list but again the list stays opened (I used a busy flag to prevent endless PRESS events).

Possible solution:

To add a return value to event handlers that will determine if the default actions should be executed(if true)

Can you try this?

lv_obj_t* dropName;
lv_timer_t* timer;
void my_timer(lv_timer_t* timer)
{
    lv_dropdown_open(dropName);
    lv_timer_del(timer);
}

void drop_cb(lv_event_t* e)
{
    lv_obj_t* drop = lv_event_get_target(e);

    if (lv_dropdown_is_open(drop) == true)
    {
        timer = lv_timer_create(my_timer, 1500, 0);
        lv_timer_set_repeat_count(timer, 1);
    }
    
    lv_dropdown_close(drop);
}

------

lv_obj_add_event_cb(dropName, drop_cb, LV_EVENT_CLICKED (AND OTHER), 0);

This is just an example with many flaws.
The problem is that the dropdown list has def cb that we cannot delete because not have access to it (not like with keyboard).

In fact, according to all the precepts of UX, I would make a custom widget that, when clicked, opens a panel with a spinner located there until all networks are found.