[GH #9648] Update dropdownMenu with updateSettings

Tags: #<Tag:0x00007f0b0990a1a8> #<Tag:0x00007f0b09909d48>

Hello,

I’m trying to update the dropdownMenu with the #updateSettings(...) function.
However, it’s throwing a JS error regardless of the data within the dropdown menu.

The error is paste bin link for formatting

I’m running the #updateSettings(...) within a beforeDropdownMenuShow hook. The reason I require this functionality as the dropdown need to include values from the currently selected column as menu subitems.

Is this possible? Am I doing something wrong?

Hi @rhys.mansfield

You are right, the call to updateSettings should not throw an error within that hook. I reported it to our Github board and will notify you upon fixing https://github.com/handsontable/handsontable/issues/9648.

When it comes to this use case, maybe you could use hidden option of a dropdown menu. It’s in the demo that I’ve send yesterday http://jsfiddle.net/36rufd78/1/. This option is used to hide an option for a given column index.