Set cell dropdown source on dropdown click

Hi, I am trying to dynamically define a cell source where the cell type is set to dropdown. When a user clicks the dropbown icon within the cell I would like to initiate a query to our database to get the dropdown values and then apply them into the dropdown shown on screen.
The issue I have is that the query itself is firing correctly but the dropdown is always empty until I esc off the cell and then click the dropdown again at which point the dropdown list is correctly showing. am I missing something?
I’ve tried this in beforeOnCellMouseDown and afterOnCellMouseDown functions.

First click of dropdown

Second click after escaping or moving cell

Hi @lbrown

When you click the arrow to open the list, it is already too late. To make the call for the values’s I recommend doing something like this https://jsfiddle.net/0u51w6e4/, where you pass a function as the source of the dropdown. Then, within the function, you can do what you want.