Editor won't delete (remove) row on second try

Editor won't delete (remove) row on second try

Igorski88Igorski88 Posts: 25Questions: 8Answers: 0
edited November 2019 in Free community support

I am using a jquery context menu to delete a row. It works the first time but the second time I do it it fails.

Code to remove the Row:

 editor
             .title('Delete Selected?')
             .buttons('Confirm delete')
             .message('Are you sure you want to delete?')
             .remove(rowIndex)

On the first try. I do see the client sending the proper Json to the server on the second try the Json data is empty. I check this by hitting the network tab on chrome's inspect tool.

Is this indicative of a common mistake?

Answers

  • Igorski88Igorski88 Posts: 25Questions: 8Answers: 0

    For some reason calling a function with the same delete code as above fixed it(outside of the document load). I wonder why this is the case. This is also the case if I want to programmatically edit a field.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @Igorski88 ,

    Possibly because the rowIndex was being treated as a constant if it wasn't in a function? If this is still an issue, please can you post your code and ideally link to a test case or your page.

    Cheers,

    Colin

This discussion has been closed.