Dropdown Menu Open Method Question

Tags: #<Tag:0x00007f8b25d22f28>

I’m trying to execute the open method within the dropdown menu but I keep getting an error when it gets called. I am also a bit unsure of what exactly I am supposed to pass as a parameter for the method, which could be the source of the issue.

This is the error I get:
TypeError: Cannot read properties of null (reading ‘visualIndex’)

current code:
const ddm = hot.getPlugin(‘DropdownMenu’);
ddm.open({pageX: 0, pageY: 0})

the dropdown does open in the top left corner but still throws the error.

Thank you

Hi @kyle.trottier

The parameters you are passing to this method are correct. However, when I recreated your issue I didn’t get any errors.

https://jsfiddle.net/aszymanski/uny7rx60/

If you use any other methods or options can you please fill them in that demo?

I added some information to this jsfiddle to more closely match the table I’m using and I am getting an error that just says “Script error”. I am unsure if it is the same error.

https://jsfiddle.net/kjtrottier/sco4mpzg/

Thank you. The error is the same, if you turn on dev console in Chrome you can see that.

I investigated that and it seems that’s a regression to version 10.0.0. That feature stopped working in version 11.0.0. I will report that on our GitHub and paste a link here so you can track it.

Thank you for the information and reply. I’ll keep and eye out in the future.

Here’s a link to the issue on GitHub: https://github.com/handsontable/handsontable/issues/9561

Hi @kyle.trottier

We just released Handsontable v12.1.3, which fixes this issue.

Here https://handsontable.com/docs/release-notes/#_12-1-3, you’ll be able to read more about the changes in Handsontable v12.1.3.