[DOCS #103] How is afterDeselect fired?

Tags: #<Tag:0x00007fa9afba5cd8> #<Tag:0x00007fa9afba92e8>

I’m trying to see if I can use the afterDeselect hook to fire when a cell is deselected .

I’ve added it, but I don’t see it firing? Does this work? I select a cell on the table…then I click off to another cell.

Is there a simple example of showing it work?

Hi @mhennessy7

The docs say that this hook is

Fired after the current cell is deselected.

But we clearly can see that this is not true. It fires only when you click outside the table.
Demo https://jsfiddle.net/8njab0c7/1/

I will check if that is a description or script issue and update you later today.

I have a conversation with the devs team and it looks like this is false description in the docs.

The following hook is called after we do clear() on the selection and run deselect() method. In both cases no cells are being selected.

I’ve reported it to our Tech Writer https://github.com/handsontable/docs/issues/103

Updating this topic with a possible way to accomplish the same goal you can use the afterSelection hook. It returns indexes of selected ranges (not only single cells).