amaan
Posts: 1
Joined: Wed Jan 15, 2025 4:43 am

cellDestroyed event not working

Hi,
I am working on a requirement where i should be able to save the dashboard configurations if a cell is destroyed from the dashboard. But I am not able to capture the cell destroyed event. Here are some of my findings-
1. If I delete a cell from a row that has more than one cells, then the layoutChanged event is triggered.
2. If there is only one cell in a row and that cell is deleted, none of the events are getting triggered.
Here is the link to fiddle - https://jsfiddle.net/amaan0farooq/02o7tLcd/1/

Would appreciate a quick response.
Thanks
User avatar
dawid.d
Site Moderator
Posts: 1222
Joined: Thu Oct 06, 2022 11:31 am

Re: cellDestroyed event not working

Hello,

Welcome to our forum and thanks for the question!

In your code you are trying to catch the `cellDestroyed` event as independent one, but it doesn't exist. Instead, catch the `layoutChanged` event and check if its type is `cellDestroyed`, like in the demo below. See the docs: https://www.highcharts.com/docs/dashboa ... ode-events

Demo: https://jsfiddle.net/BlackLabel/vzq20w6k/

I hope it was helpful!

Best regards,
Dawid Draguła
Highcharts Developer

Return to “Highcharts Dashboards”