Filter table-block dropdown update with external values

Hello everyone,

I am trying to update the values of a dropdown filter in a table block.

The values I need to insert come from an external API therefore I cannot set them as filter values when creating the page

What I am trying to achieve is

  1. Fetch the external data via custom code (OK)
  2. Update the dropdown values (somewhat OK by adding some <li> in the dropdown markup)
  3. Select a new value and confirm that it triggers a filter on the results (not OK)

I cannot make this last part work.
I tried to clone the onclick event attached to the existing <li> but this does not work. I guess it will not be as simple to interact with the react component.

Do you know any way of updating the dropdown values in my case ? Any event to listen or trigger, that would allow me to change the options available ? Or maybe an API interface I can connect with ?

Thanks in advance for your responses,

:eyes:
Following