Inline editor won't close after processing change

Inline editor won't close after processing change

chrisg123chrisg123 Posts: 9Questions: 4Answers: 0
edited October 2015 in Editor

I upgraded from Editor 1.4.2 to 1.5.1.

I know the server/client dialog has changed and I have gotten everything working as it should except for the inline editor.

After submitting the changes to the server during inline editing the editor doesn't close. (everything works fine on the server side. The changes are received and database is updated no problem).

But editor seems to 'hang' afterwards. It's basically stuck with the inline editor open. I have even tried calling editor.close();and editor._close('close') //returns undefined manually but it won't close. I have been digging deep into editors code but am at a loss.

no errors are shown which is making to really difficult to debug.
Any ideas what the issue could be? let me know if more details are needed.

Thanks.

UPDATE:
So i think I have narrowed down the problem to have something to do with this comment:

the write of the new value will set the DOM to how it should be

It seems the 'write of the new value' is not setting the DOM to 'how it should be'

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Hi,

    Thanks for the information. Could you let me know what the JSON response from the server from the inline edit is? Also, if you do a "normal" edit (i.e. edit()) does that correctly close?

    Any chance you can give me a link to the page so I can debug it?

    Thanks,
    Allan

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    I'm guessing that you are using a custom ajax call to update the data. If so, don't forget that you need to trigger the success or error call backs.

    http://editor.datatables.net/reference/option/ajax

  • chrisg123chrisg123 Posts: 9Questions: 4Answers: 0
    edited October 2015

    The hardest problems to figure out are always the simplest solutions...

    {
        "data": [ //<----------FORGOT SQUARE BRACKETS
            {
                "DT_RowId":   "row_29",
                "first_name": "Fiona",
                "last_name":  "Green",
                "position":   "Chief Operating Officer (COO)",
                "office":     "San Francisco",
                "extn":       "2947",
                "salary":     "850000",
                "start_date": "2010-03-11"
            }
        ]  //<----------FORGOT SQUARE BRACKETS
    }
    

    Well at least I have a thorough understanding of the inner workings of editor. I must have gone through almost all of editors code before realizing this...

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Easy done - good to hear you've got it working.

    Allan

This discussion has been closed.