BUG: Datatable getSelectedId returns object instead of value with one row selected

https://snippet.webix.com/b0bfuwb6

Theoretically it works OK.
When you use returned variable to POST it using webix.ajax().post AJAX request takes object as parameter - not value.
You have to remember to change

var selectedId = $$('grid').getSelectedId()
alert(selectedId)

to

var selectedId = $$('grid').getSelectedId()
alert(selectedId.id)

otherwise AJAX will send object

{ "row": 3, "column": "title", "id": 3 }

and you have an error on your backend server, since it expects a value.

I think it is by design.
to prevent such behavior you can concatenate it with empty string
var selectedId = ''+$$('grid').getSelectedId();
or use options var selectedId = $$('grid').getSelectedId(false, true);
https://docs.webix.com/api__ui.datatable_getselectedid.html

Yes but when I see function named getSelectedId I just think that I will get an Id of selected item - as function says. Documentation is sometimes very tricky.
I need to put two parameters just to get what the name says.
Thanks!