Grid + Details Renderer (setItemDetailsRenderer) How to detect open/close details in V24?

I use Grid with details set with setItemDetailsRenderer method. Is there way to detect open/close state of details?

It seams to me I have found the way:

grid.getSelectedItems().stream().anyMatch(sms->grid.isDetailsVisible(sms));