TypeError on datatable insert. Tab key while saving.

I believe I found a small bug, maybe. I cannot use the snippets because I believe the problem requires JSON response after save. I created a separate example with clean webix and the problem persists.

I have a datatable with a button that inserts a new row. In this datatable I have defined notempty rules so that it does not save until all required columns have values. The problem occurs when I use tab to jump to the next editable column. If the tab press occurs after the save is imminent (notempty satisfied), then I get the following error:
TypeError: can't assign to property "row" on 1: not an object

This doesn't happen if I click the individual columns to open the editor, only if I use tab. So perhaps on the tab press webix thinks there is another new row and the response id is duplicate?

My implementation is https://snippet.webix.com/2wjrxt8r. Only missing a proper save url with appropriate json response. Basically, add a new record. Then edit the film title and press tab key.

Or maybe I screwed up somewhere. Thanks


  • Hello,

    Unfortunately, I could not reproduce the issue.

    Could you please double check it and ensure that add script returns newid as part of server response. It is the real server id that will automatically substitute client-side id in datatable, so that you have the correct id for further updates.

    Also, could you please share a complete error stack that leads to the mentioned type error?

  • Hi, thanks for looking into it.

    I created a test page here

    Using latest webix and a file that returns dummy json values.

    To clarify, I am clicking "New Record" then double clicking the newly added "Film Title" cell to edit. Then I type in a value into "Film Title" and press TAB to continue editing next column "Released". Upon pressing tab I get the error.

    If I press enter after typing in "Film Title" value, it saves no problem.

  • Thanks for the snippet. There is really a bug there.
    Fix will be available as part of the next build.

    As temporary workaround, you can have something like

    webix.dp(table).attachEvent("onBeforeSync", () => table.editStop())
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!