I am implementing custom context menu items that have similar selection context conditions as the predefined items like remove_row, and looking at the source code for the predefined items I found the undocumented table API selection, a class with lots of useful information like isSelectedByColumnHeader(). I know we have the well-documented getSelected(), getSelectedRange(), but the .selection property has a lot of useful stuff I need, like isSelectedByColumnHeader().
Why is this not documented and not part of the TypeScript definitions? Can I safely use it? Can we at least add it to the type defs?
Thank you for bringing up this subject. I believe that there was a reason to keep it private but will ask the team. If there’s something helpful why to hide it.
I have mentioned the subject on our devs meeting on Thursday. Apparently, the selection code is a bit old and most of the methods should remain private. Some of them, like the one you’ve spotted, are unique and useful so we have decided to add an info about them in our New Docs project where you’d be able to search information semantically.